mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
more group progress, UI getting there, controller mostly done
changed it so notify moderators goes to the moderators group allow admins to grant self moderation and revoke self moderation
This commit is contained in:
@ -2,7 +2,22 @@ require 'spec_helper'
|
||||
|
||||
describe Group do
|
||||
|
||||
describe "validation" do
|
||||
let(:group) { build(:group) }
|
||||
|
||||
it "is invalid for blank" do
|
||||
group.name = ""
|
||||
group.valid?.should be_false
|
||||
end
|
||||
|
||||
it "is valid for a longer name" do
|
||||
group.name = "this_is_a_name"
|
||||
group.valid?.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
it "Can update moderator/staff/admin groups correctly" do
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
moderator = Fabricate(:moderator)
|
||||
|
||||
|
Reference in New Issue
Block a user