Hack in registration prevention (#37)
All checks were successful
Deploy / deploy (push) Successful in 4m1s

Reviewed-on: #37
This commit is contained in:
Andrew Tomaka 2024-09-08 22:18:56 -04:00
parent eaa1846d42
commit 543a9599e0
4 changed files with 32 additions and 14 deletions

View file

@ -14,4 +14,15 @@ class ActiveSupport::TestCase
post sessions_url, params: { session: { email: email, password: password } }
assert session[:current_user_id].present?
end
def stub_environment(env)
old_env = ENV.to_hash
ENV.update(env.stringify_keys)
begin
yield
ensure
ENV.replace(old_env)
end
end
end