Skip to content

Commit

Permalink
update solidus behaviour for record not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ccarruitero committed Nov 10, 2017
1 parent 815cc55 commit d1a3402
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions spec/controllers/spree/products_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
let!(:store) { FactoryBot.create(:store) }

it 'returns 404' do
get :show, params: { :id => product.to_param }

expect(response.response_code).to eq 404
expect {
get :show, params: { :id => product.to_param }
}.to raise_error(ActiveRecord::RecordNotFound)
end
end

Expand All @@ -25,9 +25,10 @@

it 'returns 404' do
allow(controller).to receive_messages(:current_store => store_2)
get :show, params: { :id => product.to_param }

expect(response.response_code).to eq 404
expect {
get :show, params: { :id => product.to_param }
}.to raise_error(ActiveRecord::RecordNotFound)
end
end

Expand Down

0 comments on commit d1a3402

Please sign in to comment.