Skip to content

Commit

Permalink
Test populate with successful response
Browse files Browse the repository at this point in the history
I don't think the original intention of this spec was for the controller
to error. This wasn't noticed because the error was being swallowed by
rescue_from render_404.
  • Loading branch information
jhawthorn committed Oct 26, 2017
1 parent 65b98ec commit f9eb6c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/spec/controllers/spree/orders_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

context "#populate" do
it "should create a new order when none specified" do
post :populate
post :populate, params: { variant_id: variant.id }
expect(response).to be_redirect
expect(cookies.signed[:guest_token]).not_to be_blank

order_by_token = Spree::Order.find_by(guest_token: cookies.signed[:guest_token])
Expand Down

0 comments on commit f9eb6c6

Please sign in to comment.