Poltergeist in the green, and resourceful refactor
This commit is contained in:
@@ -116,7 +116,7 @@ describe Suppliers::ProductsController, type: :controller do
|
||||
|
||||
it "deletes the product" do
|
||||
expect{
|
||||
delete :destroy, id: @product
|
||||
delete :destroy, id: @product
|
||||
}.to change(Product, :count).by(-1)
|
||||
end
|
||||
|
||||
@@ -128,7 +128,7 @@ describe Suppliers::ProductsController, type: :controller do
|
||||
it "should not be possible to delete a product of another supplier" do
|
||||
product = create :product
|
||||
expect{
|
||||
delete :destroy, id: product
|
||||
delete :destroy, id: product.id
|
||||
}.to_not change(Product, :count)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user