@@ -14,9 +14,9 @@ source. http://github.com/blog/97-github-loves-rubygems-1-2
1414 * gem install thoughbot-shoulda
1515 * gem install mocha
1616
17- The tests of this adapter depend on the existence of rails edge . All the tests
18- defined by rails edge are re-used. For this to work the following directory
19- structure is assumed to exist:
17+ The tests of this adapter depend on the existence of rails checkout . All the tests
18+ defined by rails are re-used. For this to work the following directory structure
19+ is assumed to exist:
2020
2121#{RAILS_ROOT}/vendor/plugins/adapters/sqlserver
2222#{RAILS_ROOT}/vendor/rails/activerecord/test
@@ -58,33 +58,3 @@ you can do so with:
5858
5959That'll run the base suite using the SQLServer-Ruby adapter.
6060
61-
62- == Expected Errors and Failures
63-
64- Currently we expect the following errors from running the test suite:
65-
66- 1. ERROR in test_add_limit_offset_should_sanitize_sql_injection_for_limit_with_comas
67- from
68- activerecord/test/cases/adapter_test.rb
69-
70- 2. ERROR in test_add_limit_offset_should_sanitize_sql_injection_for_limit_without_comas
71- from
72- activerecord/test/cases/adapter_test.rb
73-
74- 3. Error:
75- test_should_average_field(CalculationsTest)
76- test_average_with_from_option(CalculationsTest)
77- test_delegates_finds_and_calculations_to_the_base_class(NamedScopeTest)
78- http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1346-coerce-0-average-calculation-to-float
79-
80-
81- 1. & 2. error because we treat the possible values for offset and limit much more
82- aggressively than the intention of the tests. Rails expects that limit => '1,7 bad sql'
83- would turn into ' limit 1,7' but that's not valid SQL Server syntax so why should we
84- bother? So we just deny non-integer limit / offset params entirely rather than trying
85- to sanitize them. It's a hard-line to take on sql injection, but probably a safer one.
86-
87- We do however have our own offset and limit tests in test/cases/offset_and_limit_test_sqlserver
88- that test our expected behaviour.
89-
90-
0 commit comments