diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 7f0affeaad..9c5d56e8aa 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -60,7 +60,14 @@ feature "As a consumer I want to check out my cart", js: true do describe "with payment methods" do let!(:pm1) { create(:payment_method, distributors: [distributor], name: "Roger rabbit", type: "Spree::PaymentMethod::Check") } let!(:pm2) { create(:payment_method, distributors: [distributor]) } - let!(:pm3) { create(:payment_method, distributors: [distributor], name: "Paypal", type: "Spree::BillingIntegration::PaypalExpress") } + let!(:pm3) do + Spree::Gateway::PayPalExpress.create!(name: "Paypal", environment: 'test').tap do |pm| + pm.distributors << distributor + pm.preferred_login = 'devnull-facilitator_api1.rohanmitchell.com' + pm.preferred_password = '1406163716' + pm.preferred_signature = 'AFcWxV21C7fd0v3bYYYRCpSSRl31AaTntNJ-AjvUJkWf4dgJIvcLsf1V' + end + end before do visit checkout_path @@ -71,6 +78,7 @@ feature "As a consumer I want to check out my cart", js: true do it "shows all available payment methods" do page.should have_content pm1.name page.should have_content pm2.name + page.should have_content pm3.name end describe "Purchasing" do