diff options
author | Juanjo Bazán <jjbazan@gmail.com> | 2012-09-25 00:59:07 +0200 |
---|---|---|
committer | Juanjo Bazán <jjbazan@gmail.com> | 2012-10-28 22:18:45 +0100 |
commit | 300d080ada31ac297264e6abba6ca16cd2db5925 (patch) | |
tree | 253d70f1bfc68985181c1f683444c5918a6550f1 /activerecord/test | |
parent | 35ca953a27124bd6dcd7aef8a62ffa27ccab83f1 (diff) | |
download | rails-300d080ada31ac297264e6abba6ca16cd2db5925.tar.gz rails-300d080ada31ac297264e6abba6ca16cd2db5925.tar.bz2 rails-300d080ada31ac297264e6abba6ca16cd2db5925.zip |
ActiveRecord::Relation#none! method.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index 6399111be6..98e278df82 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -256,5 +256,11 @@ module ActiveRecord test 'merge with a proc' do assert_equal [:foo], relation.merge(-> { where(:foo) }).where_values end + + test 'none!' do + assert relation.none!.equal?(relation) + assert_equal [NullRelation], relation.extending_values + assert relation.is_a?(NullRelation) + end end end |