Poltergeist in the green, and resourceful refactor

This commit is contained in:
2015-02-27 15:12:08 +01:00
parent d1015dcc88
commit 046058b5d2
31 changed files with 210 additions and 165 deletions
@@ -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