summaryrefslogtreecommitdiff
path: root/engines/billing/test
diff options
context:
space:
mode:
Diffstat (limited to 'engines/billing/test')
-rw-r--r--engines/billing/test/broken/admin_customer_test.rb4
-rw-r--r--engines/billing/test/broken/customer_creation_test.rb6
-rw-r--r--engines/billing/test/broken/subscription_test.rb2
-rw-r--r--engines/billing/test/factories.rb2
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/billing/test/broken/admin_customer_test.rb b/engines/billing/test/broken/admin_customer_test.rb
index df92a0d..2fb80ca 100644
--- a/engines/billing/test/broken/admin_customer_test.rb
+++ b/engines/billing/test/broken/admin_customer_test.rb
@@ -4,8 +4,8 @@ require 'fake_braintree'
class AdminCustomerTest < BraintreeIntegrationTest
setup do
- @admin = User.find_by_login('admin') || FactoryGirl.create(:user, login: 'admin')
- @user = FactoryGirl.create(:user)
+ @admin = User.find_by_login('admin') || FactoryBot.create(:user, login: 'admin')
+ @user = FactoryBot.create(:user)
end
teardown do
diff --git a/engines/billing/test/broken/customer_creation_test.rb b/engines/billing/test/broken/customer_creation_test.rb
index 90319a9..da171c4 100644
--- a/engines/billing/test/broken/customer_creation_test.rb
+++ b/engines/billing/test/broken/customer_creation_test.rb
@@ -4,7 +4,7 @@ require 'fake_braintree'
class CustomerCreationTest < BraintreeIntegrationTest
setup do
- @user = FactoryGirl.create(:user)
+ @user = FactoryBot.create(:user)
login_as @user
end
@@ -38,7 +38,7 @@ class CustomerCreationTest < BraintreeIntegrationTest
# for a broken customer
test "successfully confirms customer creation" do
response = post_transparent_redirect :create_customer_data,
- customer: FactoryGirl.attributes_for(:braintree_customer),
+ customer: FactoryBot.attributes_for(:braintree_customer),
redirect_url: confirm_customer_url
assert_difference("Customer.count") do
@@ -57,7 +57,7 @@ class CustomerCreationTest < BraintreeIntegrationTest
FakeBraintree.decline_all_cards!
response = post_transparent_redirect :create_customer_data,
- customer: FactoryGirl.attributes_for(:broken_customer),
+ customer: FactoryBot.attributes_for(:broken_customer),
redirect_url: confirm_customer_url
assert FakeBraintree.decline_all_cards?
diff --git a/engines/billing/test/broken/subscription_test.rb b/engines/billing/test/broken/subscription_test.rb
index cd010bd..dd9bba9 100644
--- a/engines/billing/test/broken/subscription_test.rb
+++ b/engines/billing/test/broken/subscription_test.rb
@@ -6,7 +6,7 @@ class SubscriptionTest < BraintreeIntegrationTest
include StubRecordHelper
setup do
- @admin = User.find_by_login('admin') || FactoryGirl.create(:user, login: 'admin')
+ @admin = User.find_by_login('admin') || FactoryBot.create(:user, login: 'admin')
@customer = stub_customer
@braintree_customer = @customer.braintree_customer
response = Braintree::Subscription.create plan_id: '5',
diff --git a/engines/billing/test/factories.rb b/engines/billing/test/factories.rb
index 6352211..572da48 100644
--- a/engines/billing/test/factories.rb
+++ b/engines/billing/test/factories.rb
@@ -1,4 +1,4 @@
-FactoryGirl.define do
+FactoryBot.define do
TEST_CC_NUMBER = %w(4111 1111 1111 1111).join