mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user