This project is archived and is in readonly mode.

#1758 ✓duplicate

Patch to adapter_test cases so that the tests work for all adapters

Reported by rwc9u | January 14th, 2009 @ 06:37 AM | in 2.x

The following two tests assert that the database adapter returns the appropriate limit and offset sql; however, limit and offset are not supported in Oracle, so the tests currently fail for the Oracle adapter (the oracle adapters handle this by making the sql query a subselect and using oracles rownums in the outer select).

  • test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas
  • test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas

Instead of adding another conditional check of the current adapter under test my patch changes the asserts to check that the sql injection is not present in the resulting limit/offset sql. This changes the tests to be adapter agnostic.

I have tested these changes with the following adapters: MySQL, Postgres, SQLite3, and OracleEnhanced.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>