Skip to content

Commit 8fa3e3d

Browse files
Assert (org) maintainers can't invite others (#6090)
This was added in a pull request that was enhancing permissions, but the code under test (for this) did not change. Adding this separately to scope down that change.
1 parent a62126f commit 8fa3e3d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/system/invitation_test.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ class InvitationTest < ApplicationSystemTestCase
2525
assert_text I18n.t("organizations.members.create.member_invited")
2626
end
2727

28+
test "maintainers cannot invite users to an organization" do
29+
maintainer = create(:user)
30+
create(:membership, user: maintainer, organization: @organization, role: :maintainer)
31+
32+
sign_in maintainer
33+
34+
visit organization_path(@organization)
35+
36+
assert_no_text "Invite"
37+
end
38+
2839
test "accepting an invitation to an organization" do
2940
membership = create(:membership, :pending, user: @outside_user, organization: @organization, invited_by: @user)
3041
OrganizationMailer.user_invited(membership).deliver_now

0 commit comments

Comments
 (0)