diff options
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index 3cc31b3db0..7bdbd773b6 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -124,5 +124,16 @@ module ActiveRecord relation.create_with_value = {:hello => 'world'} assert_equal({}, relation.scope_for_create) end + + def test_empty_eager_loading? + relation = Relation.new :a, :b + assert !relation.eager_loading? + end + + def test_eager_load_values + relation = Relation.new :a, :b + relation.eager_load_values << :b + assert relation.eager_loading? + end end end |