Skip to content
Browse files

Add parentheses to avoid warnings when running AR tests.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent d103c73 commit ab2877cbe89e266ee986fc12e603abd93ac017ad @miloops miloops committed with josevalim Jun 8, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/adapter_test.rb
View
8 activerecord/test/cases/adapter_test.rb
@@ -145,13 +145,13 @@ def test_foreign_key_violations_are_translated_to_specific_exception
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

2 comments on commit ab2877c

@ernie
ernie commented on ab2877c Jun 8, 2010

"with_comas" == A test for code that becomes a vegetable? :)

@Aupajo
Aupajo commented on ab2877c Jun 9, 2010

@ernie Comments like these make me wish GitHub had an upvote button.

Please sign in to comment.
Something went wrong with that request. Please try again.