Skip to content

Commit 18f4d02

Browse files
committed
Skip tests that show ActiveRecord 3.2.3 regressions.
1 parent 9f06d96 commit 18f4d02

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/cases/offset_and_limit_test_sqlserver.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,19 @@ class OffsetAndLimitTestSqlserver < ActiveRecord::TestCase
3333
assert_equal Book.all[5,3].map(&:id), books.map(&:id)
3434
end
3535

36-
should 'allow sql literal for offset' do
37-
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(3-2\)/) { Book.limit(10).offset(Arel.sql('3-2')).all }
36+
# ActiveRecord Regression 3.2.3?
37+
# https://github.com/rails/rails/commit/a2c2f406612a1855fbc6fe816cf3e15b4ef531d3#commitcomment-1208811
38+
should_eventually 'allow sql literal for offset' do
39+
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(3-2\)/) { Book.limit(10).offset(Arel::Nodes::Ascending.new('3-2')).all }
3840
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(SELECT 8 AS \[count\]\)/) do
3941
books = Book.all :limit => 3, :offset => Arel.sql('SELECT 8 AS [count]')
4042
assert_equal 2, books.size, 'remember there are only 10 books and offset is 8'
4143
end
4244
end
4345

44-
should 'not convert strings which look like integers to integers' do
46+
# ActiveRecord Regression 3.2.3?
47+
# https://github.com/rails/rails/commit/a2c2f406612a1855fbc6fe816cf3e15b4ef531d3#commitcomment-1208811
48+
should_eventually 'not convert strings which look like integers to integers' do
4549
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(N''5''\)/) { Book.limit(10).offset('5').all }
4650
end
4751

0 commit comments

Comments
 (0)