Skip to content

Commit

Permalink
update spec according new solidus behaviour for 404
Browse files Browse the repository at this point in the history
  • Loading branch information
ccarruitero committed Nov 11, 2017
1 parent edc9f1a commit 62d4791
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions spec/controllers/spree/products_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
allow(controller).to receive(:before_save_new_order)
allow(controller).to receive(:spree_current_user) { user }
allow(user).to receive(:has_spree_role?) { false }
get :show, params: { id: product.to_param }
expect(response.status).to eq(404)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.5.x')
get :show, params: { id: product.to_param }
expect(response.status).to eq(404)
else
expect {
get :show, params: { id: product.to_param }
}.to raise_error(ActiveRecord::RecordNotFound)
end
end
end

0 comments on commit 62d4791

Please sign in to comment.