diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-06-08 15:07:51 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-08 21:16:19 +0200 |
commit | ab2877cbe89e266ee986fc12e603abd93ac017ad (patch) | |
tree | b3dde0ee38f8510ac6a7e1a1205808901ecaebba /activerecord/test | |
parent | d103c73d959a7caebfe7e7c323cf47a83ca73e3b (diff) | |
download | rails-ab2877cbe89e266ee986fc12e603abd93ac017ad.tar.gz rails-ab2877cbe89e266ee986fc12e603abd93ac017ad.tar.bz2 rails-ab2877cbe89e266ee986fc12e603abd93ac017ad.zip |
Add parentheses to avoid warnings when running AR tests.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 0152b7be2a..fc08c2178a 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -145,13 +145,13 @@ class AdapterTest < ActiveRecord::TestCase def test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas sql_inject = "1 select * from schema" - assert_no_match /schema/, @connection.add_limit_offset!("", :limit=>sql_inject) - assert_no_match /schema/, @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7) + assert_no_match(/schema/, @connection.add_limit_offset!("", :limit=>sql_inject)) + assert_no_match(/schema/, @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7)) end def test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas sql_inject = "1, 7 procedure help()" - assert_no_match /procedure/, @connection.add_limit_offset!("", :limit=>sql_inject) - assert_no_match /procedure/, @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7) + assert_no_match(/procedure/, @connection.add_limit_offset!("", :limit=>sql_inject)) + assert_no_match(/procedure/, @connection.add_limit_offset!("", :limit=>sql_inject, :offset=>7)) end end |