spec/requests/recipes_spec.rb in cookbook-0.1.5 vs spec/requests/recipes_spec.rb in cookbook-0.1.6
- old
+ new
@@ -69,16 +69,16 @@
describe 'PATCH /update' do
let(:new_attributes) do
{
name: 'Foo',
- ingredient_uses_attributes: [
- {
+ ingredient_uses_attributes: {
+ 0 => {
use_of_id: ingredient.id,
use_of_type: 'Ingredient',
note: 'Test Note'
}
- ]
+ }
}
end
context 'with valid parameters' do
it 'updates the requested recipe' do
patch recipe_url(recipe), params: { recipe: new_attributes }