Fix: the queenbe mocks were not really being applied
This commit is contained in:
@@ -17,6 +17,13 @@ module Fizzy
|
||||
app.config.middleware.insert_after(ActiveRecord::Middleware::DatabaseSelector, TransactionPinning::Middleware)
|
||||
end
|
||||
|
||||
# Load test mocks automatically in test environment
|
||||
initializer "fizzy_saas.test_mocks", after: :load_config_initializers do
|
||||
if Rails.env.test?
|
||||
require "fizzy/saas/testing"
|
||||
end
|
||||
end
|
||||
|
||||
config.to_prepare do
|
||||
Queenbee::Subscription.short_names = Subscription::SHORT_NAMES
|
||||
Queenbee::ApiToken.token = Rails.application.credentials.dig(:queenbee_api_token)
|
||||
|
||||
@@ -18,8 +18,6 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "create" do
|
||||
Queenbee::Remote::Account.any_instance.stubs(:save).returns(true)
|
||||
|
||||
untenanted do
|
||||
post saas.signup_completion_path, params: {
|
||||
signup: {
|
||||
|
||||
@@ -30,7 +30,6 @@ class SignupTest < ActiveSupport::TestCase
|
||||
|
||||
test "#complete" do
|
||||
::Account.any_instance.expects(:setup_customer_template).once
|
||||
Queenbee::Remote::Account.any_instance.stubs(:save).returns(true)
|
||||
|
||||
::Current.without_account do
|
||||
signup = Signup.new(
|
||||
|
||||
Reference in New Issue
Block a user