Prohibit duplicate memberships

This commit is contained in:
Stanko K.R.
2025-11-05 11:57:40 +01:00
parent 0f0d800d01
commit cfdd7ab1cb
11 changed files with 150 additions and 7 deletions
@@ -51,7 +51,7 @@ class JoinCodesControllerTest < ActionDispatch::IntegrationTest
untenanted do
assert_no_difference -> { Identity.count } do
assert_difference -> { Membership.count }, 1 do
assert_no_difference -> { Membership.count } do
post join_path(tenant: @tenant, code: @join_code.code), params: { email_address: identity.email_address }
end
end