Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api checkouts spec #845

Merged
merged 2 commits into from
Feb 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions api/spec/controllers/spree/api/checkouts_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,6 @@ module Spree
end
end

it "can transition from confirm to complete" do
order.update_columns(completed_at: Time.current, state: 'complete')
allow_any_instance_of(Spree::Order).to receive_messages(payment_required?: false)
api_put :update, id: order.to_param, order_token: order.guest_token
expect(json_response['state']).to eq('complete')
expect(response.status).to eq(200)
end

it "returns the order if the order is already complete" do
order.update_columns(completed_at: Time.current, state: 'complete')
api_put :update, id: order.to_param, order_token: order.guest_token
Expand Down Expand Up @@ -511,7 +503,7 @@ module Spree
context "PUT 'advance'" do
let!(:order) { create(:order_with_line_items) }

it 'continues to advance advances an order while it can move forward' do
it 'continues to advance an order while it can move forward' do
expect_any_instance_of(Spree::Order).to receive(:next).exactly(3).times.and_return(true, true, false)
api_put :advance, id: order.to_param, order_token: order.guest_token
end
Expand Down