Stub QB requests in tests

This commit is contained in:
Jorge Manrubia
2025-11-24 15:58:57 +01:00
parent 73be889a18
commit 8019aa154f
3 changed files with 4 additions and 1 deletions
@@ -5,7 +5,6 @@ class SaasSessionsControllerTest < ActionDispatch::IntegrationTest
untenanted do
assert_difference -> { Identity.count }, +1 do
assert_difference -> { MagicLink.count }, +1 do
puts "BEFORE!"
post session_path,
params: { email_address: "nonexistent-#{SecureRandom.hex(6)}@example.com" },
headers: http_basic_auth_headers("testname", "testpassword")
@@ -18,6 +18,8 @@ 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: {
+2
View File
@@ -30,6 +30,8 @@ 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(
full_name: "Kevin",