Switch spec to better spree paypal express payment method

This commit is contained in:
Rohan Mitchell
2014-07-25 13:47:31 +10:00
parent fd3040d394
commit f73a63e944

View File

@@ -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