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.
This commit is contained in:
Matt-Yorkley
2021-05-02 13:41:04 +01:00
parent 2560757ea2
commit 7c2d77a3ee

View File

@@ -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