aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-06-25 14:48:54 -0700
committerPiotr Sarnacki <drogus@gmail.com>2012-06-25 14:48:54 -0700
commit9e1a199568f40f2f26d98731e9dce3646ddf25a9 (patch)
treea750e70a4a1bd327b2e5ad495f15a913aeacd88c /activerecord/test/cases
parente5abb89c54ed04e4811cec84c38742e4a6a0c4c5 (diff)
parent359592bba6cb85b43ca8945917b1ca57fa7494a9 (diff)
downloadrails-9e1a199568f40f2f26d98731e9dce3646ddf25a9.tar.gz
rails-9e1a199568f40f2f26d98731e9dce3646ddf25a9.tar.bz2
rails-9e1a199568f40f2f26d98731e9dce3646ddf25a9.zip
Merge pull request #6544 from flexoid/issue-6431
exists?(false) returns false
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/finder_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index e62d984ebd..576a455f09 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -55,6 +55,10 @@ class FinderTest < ActiveRecord::TestCase
assert Topic.exists?
end
+ def test_exists_returns_false_with_false_arg
+ assert !Topic.exists?(false)
+ end
+
# exists? should handle nil for id's that come from URLs and always return false
# (example: Topic.exists?(params[:id])) where params[:id] is nil
def test_exists_with_nil_arg