diff --git a/spec/controllers/api/nonprofits_controller_spec.rb b/spec/controllers/api/nonprofits_controller_spec.rb index f4e41b44..793bc499 100644 --- a/spec/controllers/api/nonprofits_controller_spec.rb +++ b/spec/controllers/api/nonprofits_controller_spec.rb @@ -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 diff --git a/spec/lib/cancel_billing_subscriptions_spec.rb b/spec/lib/cancel_billing_subscriptions_spec.rb index a0ca0734..f956acbf 100644 --- a/spec/lib/cancel_billing_subscriptions_spec.rb +++ b/spec/lib/cancel_billing_subscriptions_spec.rb @@ -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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a486730c..996b6864 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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|