aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/scoping/default_scoping_test.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-07-16 10:09:57 +0200
committerGitHub <noreply@github.com>2017-07-16 10:09:57 +0200
commitf3d67e67abc1fc40b691372af318ede8e30fc4bf (patch)
tree301350f925e10f533c75923585a0f84d99828897 /activerecord/test/cases/scoping/default_scoping_test.rb
parent1766e8e6ff9133b8254937791d48eedf2a3f7864 (diff)
parent01c85097d4977b0c141b7c89df15c0750f37c62d (diff)
downloadrails-f3d67e67abc1fc40b691372af318ede8e30fc4bf.tar.gz
rails-f3d67e67abc1fc40b691372af318ede8e30fc4bf.tar.bz2
rails-f3d67e67abc1fc40b691372af318ede8e30fc4bf.zip
Merge pull request #29771 from kamipo/fix_create_with_using_both_string_and_symbol
Fix `create_with` using both string and symbol
Diffstat (limited to 'activerecord/test/cases/scoping/default_scoping_test.rb')
-rw-r--r--activerecord/test/cases/scoping/default_scoping_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/scoping/default_scoping_test.rb b/activerecord/test/cases/scoping/default_scoping_test.rb
index 89fb434b27..e310739f7b 100644
--- a/activerecord/test/cases/scoping/default_scoping_test.rb
+++ b/activerecord/test/cases/scoping/default_scoping_test.rb
@@ -342,6 +342,11 @@ class DefaultScopingTest < ActiveRecord::TestCase
assert_equal "Aaron", aaron.name
end
+ def test_create_with_using_both_string_and_symbol
+ jamis = PoorDeveloperCalledJamis.create_with(name: "foo").create_with("name" => "Aaron").new
+ assert_equal "Aaron", jamis.name
+ end
+
def test_create_with_reset
jamis = PoorDeveloperCalledJamis.create_with(name: "Aaron").create_with(nil).new
assert_equal "Jamis", jamis.name