Skip to content

Commit 10caf8e

Browse files
committed
Remove tests where Rails is not doing what the said with Arel.
1 parent 2fe6553 commit 10caf8e

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

test/cases/offset_and_limit_test_sqlserver.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,6 @@ class OffsetAndLimitTestSqlserver < ActiveRecord::TestCase
4444
books = Book.all :select => 'books.id, books.name', :limit => 3, :offset => 5
4545
assert_equal Book.all[5,3].map(&:id), books.map(&:id)
4646
end
47-
48-
# ActiveRecord Regression 3.2.3?
49-
# https://github.com/rails/rails/commit/a2c2f406612a1855fbc6fe816cf3e15b4ef531d3#commitcomment-1208811
50-
should_eventually 'allow sql literal for offset' do
51-
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(3-2\)/) { Book.limit(10).offset(Arel::Nodes::Ascending.new('3-2')).all }
52-
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(SELECT 8 AS \[count\]\)/) do
53-
books = Book.all :limit => 3, :offset => Arel.sql('SELECT 8 AS [count]')
54-
assert_equal 2, books.size, 'remember there are only 10 books and offset is 8'
55-
end
56-
end
57-
58-
# ActiveRecord Regression 3.2.3?
59-
# https://github.com/rails/rails/commit/a2c2f406612a1855fbc6fe816cf3e15b4ef531d3#commitcomment-1208811
60-
should_eventually 'not convert strings which look like integers to integers' do
61-
assert_sql(/WHERE \[__rnt\]\.\[__rn\] > \(N''5''\)/) { Book.limit(10).offset('5').all }
62-
end
6347

6448
should 'alter SQL to limit number of records returned offset by specified amount' do
6549
sql = %|EXEC sp_executesql N'SELECT TOP (3) [__rnt].* FROM ( SELECT ROW_NUMBER() OVER (ORDER BY [books].[id] ASC) AS [__rn], [books].* FROM [books] ) AS [__rnt] WHERE [__rnt].[__rn] > (5) ORDER BY [__rnt].[__rn] ASC'|

0 commit comments

Comments
 (0)