tests: fix test failures when running without API keys.
Fix the test suite failing when trying to run it in the default state with no config file or API keys configured. Most source sites require API keys or login credentials to be set in order to work. Skip these tests when credentials aren't configured.
This commit is contained in:
@@ -44,6 +44,8 @@ class UserUpgradeTest < ActiveSupport::TestCase
|
||||
context "for a gifted upgrade" do
|
||||
context "to Gold" do
|
||||
should "prefill the Stripe checkout page with the purchaser's email address" do
|
||||
skip "Stripe API keys not configured" unless UserUpgrade.enabled?
|
||||
|
||||
@user = create(:user, email_address: build(:email_address))
|
||||
@user_upgrade = create(:gift_gold_upgrade, purchaser: @user)
|
||||
@checkout = @user_upgrade.create_checkout!
|
||||
|
||||
Reference in New Issue
Block a user