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
-15
View File
@@ -1,15 +0,0 @@
# encoding: UTF-8
require 'spec_helper'
describe SupplierController, type: :controller do
before :each do
setup_supplier_for_controller
end
describe "GET settings" do
it 'displays the settings page' do
get :edit
end
end
end
@@ -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