Require authentication for most endpoints (#29)

Reviewed-on: #29
This commit is contained in:
Andrew Tomaka 2024-09-08 21:07:51 -04:00
parent 0f95034e8e
commit c64550785e
15 changed files with 84 additions and 11 deletions

View file

@ -10,4 +10,8 @@ class ActiveSupport::TestCase
fixtures :all
# Add more helper methods to be used by all tests here...
def login(email, password = "secret")
post sessions_url, params: { session: { email: email, password: password } }
assert session[:current_user_id].present?
end
end