Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Pend paypal spec if paypal popup not available #130

Merged
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
end

context 'with a payment method id' do
before do
create_gateway id: 3
end

subject(:response) do
post :create, params: { token: user.spree_api_key, payment_method_id: 3 }
post :create, params: { token: user.spree_api_key, payment_method_id: gateway.id }
end

it 'uses the selected gateway' do
expect(json["payment_method_id"]).to eq 3
expect(json["payment_method_id"]).to eq gateway.id
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions spec/features/frontend/paypal_checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ def move_through_paypal_popup
rescue Capybara::ElementNotFound => e
pending "PayPal delivered unkown HTML in their popup window."
raise e
rescue Capybara::Poltergeist::NoSuchWindowError => e
pending "PayPal popup not available."
raise e
end

page.switch_to_window(page.windows.first)
Expand Down