Hack in registration prevention (#37)
All checks were successful
Deploy / deploy (push) Successful in 4m1s
All checks were successful
Deploy / deploy (push) Successful in 4m1s
Reviewed-on: #37
This commit is contained in:
parent
eaa1846d42
commit
543a9599e0
4 changed files with 32 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue