mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Set last_login_at only at login instead of every single action (#1017)
This commit is contained in:
@@ -24,6 +24,14 @@ class RegistrationsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
test "sets last_login_at on successful registration" do
|
||||
post registration_url, params: { user: {
|
||||
email: "john@example.com",
|
||||
password: "password",
|
||||
password_confirmation: "password" } }
|
||||
assert_not_nil User.find_by(email: "john@example.com").last_login_at
|
||||
end
|
||||
|
||||
test "create when hosted requires an invite code" do
|
||||
with_env_overrides REQUIRE_INVITE_CODE: "true" do
|
||||
assert_no_difference "User.count" do
|
||||
|
||||
Reference in New Issue
Block a user