Skip to content
Browse files

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

  • Loading branch information...
1 parent 0dea33f commit 687cd75fb5860ddf33c7ab5ee2e0f0c5d772acec @akshay-vishnoi akshay-vishnoi 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 687cd75

Please sign in to comment.
Something went wrong with that request. Please try again.