Fix specs related to adding the billing plan on nonprofit creation
This commit is contained in:
		
							parent
							
								
									436efb7c5f
								
							
						
					
					
						commit
						9b3aee8f71
					
				
					 3 changed files with 4 additions and 1 deletions
				
			
		|  | @ -54,6 +54,8 @@ describe Api::NonprofitsController, type: :request do | ||||||
|        |        | ||||||
|       expect(response.parsed_body['id']).to be > 0 |       expect(response.parsed_body['id']).to be > 0 | ||||||
|       expect(response.parsed_body.except('id')).to eq expected_np |       expect(response.parsed_body.except('id')).to eq expected_np | ||||||
|  | 
 | ||||||
|  |       expect(Nonprofit.find(1).billing_plan).to_not be_nil | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  |  | ||||||
|  | @ -60,7 +60,7 @@ describe CancelBillingSubscription do | ||||||
| 
 | 
 | ||||||
|       create(:card, holder: @np, stripe_customer_id: @stripe_customer.id) |       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) |       @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 |     end | ||||||
| 
 | 
 | ||||||
|     it 'handles failure of stripe properly' do |     it 'handles failure of stripe properly' do | ||||||
|  |  | ||||||
|  | @ -105,6 +105,7 @@ RSpec.configure do |config| | ||||||
|   config.before(:suite) do |   config.before(:suite) do | ||||||
|     DatabaseCleaner.strategy = :transaction |     DatabaseCleaner.strategy = :transaction | ||||||
|     DatabaseCleaner.clean_with(:truncation, reset_ids: true) |     DatabaseCleaner.clean_with(:truncation, reset_ids: true) | ||||||
|  |     Rails.application.load_seed | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   config.around(:each) do |example| |   config.around(:each) do |example| | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eric
						Eric