Permalink
Browse files

Merge pull request #13343 from akshay-vishnoi/test-cases

test case for #limit added - picking latest value from limit
  • Loading branch information...
2 parents 9985503 + 687cd75 commit c56bbaaf6f6e0ba041eea542da9a23d18edc2715 @rafaelfranca rafaelfranca committed Dec 17, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/test/cases/base_test.rb
View
4 activerecord/test/cases/base_test.rb
@@ -121,6 +121,10 @@ def test_limit_without_comma
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

0 comments on commit c56bbaa

Please sign in to comment.