Fix specs related to adding the billing plan on nonprofit creation

This commit is contained in:
Eric 2020-06-23 12:06:29 -05:00 committed by Eric Schultz
parent 436efb7c5f
commit 9b3aee8f71
3 changed files with 4 additions and 1 deletions

View file

@ -54,6 +54,8 @@ describe Api::NonprofitsController, type: :request do
expect(response.parsed_body['id']).to be > 0
expect(response.parsed_body.except('id')).to eq expected_np
expect(Nonprofit.find(1).billing_plan).to_not be_nil
end
end
end

View file

@ -60,7 +60,7 @@ describe CancelBillingSubscription do
create(:card, holder: @np, stripe_customer_id: @stripe_customer.id)
@np.billing_subscription = build(:billing_subscription, billing_plan: bp, stripe_subscription_id: @original_str_subscription.id)
@default_plan = create(:billing_plan, id: Houdini.default_bp)
@default_plan = BillingPlan.find(Houdini.default_bp)
end
it 'handles failure of stripe properly' do

View file

@ -105,6 +105,7 @@ RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation, reset_ids: true)
Rails.application.load_seed
end
config.around(:each) do |example|