mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: validate automatic membership email domains
This commit is contained in:
parent
f74a6457ee
commit
6354324f2f
3 changed files with 24 additions and 0 deletions
|
@ -33,6 +33,16 @@ describe Group do
|
|||
group.name = 'This_Is_A_Name'
|
||||
expect(group.valid?).to eq false
|
||||
end
|
||||
|
||||
it "is invalid for poorly formatted domains" do
|
||||
group.automatic_membership_email_domains = "wikipedia.org|*@example.com"
|
||||
expect(group.valid?).to eq false
|
||||
end
|
||||
|
||||
it "is valid for proper domains" do
|
||||
group.automatic_membership_email_domains = "discourse.org|wikipedia.org"
|
||||
expect(group.valid?).to eq true
|
||||
end
|
||||
end
|
||||
|
||||
def real_admins
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue