1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

test case for #limit added - picking latest value from limit

This commit is contained in:
Akshay Vishnoi 2013-12-17 03:50:34 +05:30
parent 0dea33f770
commit 687cd75fb5

View file

@ -121,6 +121,10 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal 1, Topic.limit(1).to_a.length
end
def test_limit_should_take_value_from_latest_limit
assert_equal 1, Topic.limit(2).limit(1).to_a.length
end
def test_invalid_limit
assert_raises(ArgumentError) do
Topic.limit("asdfadf").to_a