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:
parent
0dea33f770
commit
687cd75fb5
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue