Skip to content

Commit

Permalink
don't use hardcoded ids in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysiek1507 committed Aug 6, 2016
1 parent 9925d32 commit 78dc93b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/controllers/spree/admin/relations_controller_spec.rb
Expand Up @@ -55,7 +55,7 @@

context '#update' do
it 'redirects to product/related url' do
spree_put :update, product_id: product.id, id: 1, relation: { discount_amount: 2.0 }
spree_put :update, product_id: product.id, id: relation.id, relation: { discount_amount: 2.0 }
expect(response).to redirect_to(spree.admin_product_path(relation.relatable) + '/related')
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/spree/api/relations_controller_spec.rb
Expand Up @@ -59,7 +59,7 @@
context '#destroy with' do
it 'records successfully' do
expect {
spree_delete :destroy, id: 1, product_id: product.id, format: :json, token: user.spree_api_key
spree_delete :destroy, id: relation.id, product_id: product.id, format: :json, token: user.spree_api_key
}.to change(Spree::Relation, :count).by(-1)
end
end
Expand Down

0 comments on commit 78dc93b

Please sign in to comment.