Skip to content

Commit b7f4ad6

Browse files
forkataAlistairNorman
authored andcommitted
Start working on a proper PayPal spec
The specs we copied didn't really add any coverage to the PayPal controllers in the extension, so this change starts work on actually testing the PayPal flow.
1 parent afe8e98 commit b7f4ad6

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

storefront/templates/spec/system/paypal_spec.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ def js_sdk_script_partner_id
1313

1414
describe "paypal payment method" do
1515
let(:order) { Spree::TestingSupport::OrderWalkthrough.up_to(:payment) }
16-
let(:paypal_payment_method) { create(:paypal_payment_method) }
16+
let(:paypal_payment_method) {
17+
create(
18+
:paypal_payment_method,
19+
preferences: {
20+
client_id: ENV['PAYPAL_CLIENT_ID'],
21+
client_secret: ENV['PAYPAL_CLIENT_SECRET'],
22+
venmo_standalone: 'disabled'
23+
}
24+
)
25+
}
1726
let(:failed_response) { double('response', status_code: 500) } # rubocop:disable RSpec/VerifiedDoubles
1827

1928
before do
@@ -72,9 +81,9 @@ def js_sdk_script_partner_id
7281
it "proceeds to the next step" do
7382
visit '/checkout/payment'
7483
choose(option: paypal_payment_method.id)
75-
find(:xpath, "//input[@id='payments_source_paypal_order_id']", visible: false).set SecureRandom.hex(8)
7684
click_button("Save and Continue")
7785
expect(page).to have_css(".current", text: "Confirm")
86+
binding.irb
7887
end
7988

8089
it "records the paypal email address" do

0 commit comments

Comments
 (0)