diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-06-23 17:57:31 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-06-23 17:57:31 -0300 |
commit | 4864f92ee34e840307d968fa8b04972b6d786fe8 (patch) | |
tree | fbee9cb78731db327b383124bcba9c26ee525cb5 /activerecord/test | |
parent | 02a723f7b5f30b00fc77bc85162598f707c7b682 (diff) | |
download | rails-4864f92ee34e840307d968fa8b04972b6d786fe8.tar.gz rails-4864f92ee34e840307d968fa8b04972b6d786fe8.tar.bz2 rails-4864f92ee34e840307d968fa8b04972b6d786fe8.zip |
Removed unused methods.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 04770646b2..544daf8f60 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -109,25 +109,4 @@ class AdapterTest < ActiveRecord::TestCase end end end - - def test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas - sql_inject = "1 select * from schema" - assert_equal " LIMIT 1", @connection.add_limit_offset!("", :limit=>sql_inject) - if current_adapter?(:MysqlAdapter) - assert_equal " LIMIT 7, 1", @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7) - else - assert_equal " LIMIT 1 OFFSET 7", @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7) - end - end - - def test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas - sql_inject = "1, 7 procedure help()" - if current_adapter?(:MysqlAdapter) - assert_equal " LIMIT 1,7", @connection.add_limit_offset!("", :limit=>sql_inject) - assert_equal " LIMIT 7, 1", @connection.add_limit_offset!("", :limit=> '1 ; DROP TABLE USERS', :offset=>7) - else - assert_equal " LIMIT 1,7", @connection.add_limit_offset!("", :limit=>sql_inject) - assert_equal " LIMIT 1,7 OFFSET 7", @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7) - end - end end |