summaryrefslogtreecommitdiff
path: root/billing/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'billing/test/integration')
-rw-r--r--billing/test/integration/admin_customer_test.rb7
-rw-r--r--billing/test/integration/customer_creation_test.rb7
-rw-r--r--billing/test/integration/subscription_test.rb6
3 files changed, 3 insertions, 17 deletions
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