From 361cdbbacc57b17c198489238282e786cc827efa Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 11 Apr 2014 09:31:16 +0200 Subject: make sure billing tests do not interfere with others they are still broken though. --- billing/test/integration/admin_customer_test.rb | 7 +------ billing/test/integration/customer_creation_test.rb | 7 +------ billing/test/integration/subscription_test.rb | 6 +----- 3 files changed, 3 insertions(+), 17 deletions(-) (limited to 'billing/test/integration') diff --git a/billing/test/integration/admin_customer_test.rb b/billing/test/integration/admin_customer_test.rb index 1b9953f..df92a0d 100644 --- a/billing/test/integration/admin_customer_test.rb +++ b/billing/test/integration/admin_customer_test.rb @@ -1,19 +1,14 @@ require 'test_helper' require 'fake_braintree' -require 'capybara/rails' -class AdminCustomerTest < ActionDispatch::IntegrationTest - include Warden::Test::Helpers - include Capybara::DSL +class AdminCustomerTest < BraintreeIntegrationTest setup do - Warden.test_mode! @admin = User.find_by_login('admin') || FactoryGirl.create(:user, login: 'admin') @user = FactoryGirl.create(:user) end teardown do - Warden.test_reset! @user.destroy if @user @admin.destroy if @admin end diff --git a/billing/test/integration/customer_creation_test.rb b/billing/test/integration/customer_creation_test.rb index aabd9b6..90319a9 100644 --- a/billing/test/integration/customer_creation_test.rb +++ b/billing/test/integration/customer_creation_test.rb @@ -1,20 +1,15 @@ require 'test_helper' require 'fake_braintree' -require 'capybara/rails' -class CustomerCreationTest < ActionDispatch::IntegrationTest - include Warden::Test::Helpers - include Capybara::DSL +class CustomerCreationTest < BraintreeIntegrationTest setup do - Warden.test_mode! @user = FactoryGirl.create(:user) login_as @user end teardown do @user.destroy - Warden.test_reset! end # Let's test both steps together with capybara diff --git a/billing/test/integration/subscription_test.rb b/billing/test/integration/subscription_test.rb index 1473eb0..cd010bd 100644 --- a/billing/test/integration/subscription_test.rb +++ b/billing/test/integration/subscription_test.rb @@ -1,14 +1,11 @@ require 'test_helper' require 'fake_braintree' -require 'capybara/rails' -class SubscriptionTest < BrowserIntegrationTest - include Warden::Test::Helpers +class SubscriptionTest < BraintreeIntegrationTest include CustomerTestHelper include StubRecordHelper setup do - Warden.test_mode! @admin = User.find_by_login('admin') || FactoryGirl.create(:user, login: 'admin') @customer = stub_customer @braintree_customer = @customer.braintree_customer @@ -19,7 +16,6 @@ class SubscriptionTest < BrowserIntegrationTest end teardown do - Warden.test_reset! @admin.destroy end -- cgit v1.2.3