From 7c2d77a3ee78c1c158fd43cfd5f9fb42bd07e9cf Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 2 May 2021 13:41:04 +0100 Subject: [PATCH] Fix assertion in ModelSet test The mismatched use of hash attributes as strings and hash attributes as symbols here (attrs['name'] and attrs[:name]) meant that the conditional was not returning the expected results in the test. --- spec/services/sets/model_set_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/services/sets/model_set_spec.rb b/spec/services/sets/model_set_spec.rb index d9154c5bf1..97528f5df4 100644 --- a/spec/services/sets/model_set_spec.rb +++ b/spec/services/sets/model_set_spec.rb @@ -51,7 +51,7 @@ describe Sets::ModelSet do attributes = { collection_attributes: { '1' => { name: 'deleteme' } } } ms = Sets::ModelSet.new(Enterprise, Enterprise.all, attributes, nil, - proc { |attrs| attrs['name'] == 'deleteme' }) + proc { |attrs| attrs[:name] == 'deleteme' }) expect { ms.save }.to change(Enterprise, :count).by(0) end