Moved ChannelMember.NotifyLevel into ChannelMember.NotifyProps
Этот коммит содержится в:
@@ -31,7 +31,6 @@ func TestChannelMemberIsValid(t *testing.T) {
|
||||
}
|
||||
|
||||
o.Roles = "missing"
|
||||
o.NotifyLevel = CHANNEL_NOTIFY_ALL
|
||||
o.NotifyProps = GetDefaultChannelNotifyProps()
|
||||
o.UserId = NewId()
|
||||
if err := o.IsValid(); err == nil {
|
||||
@@ -39,17 +38,17 @@ func TestChannelMemberIsValid(t *testing.T) {
|
||||
}
|
||||
|
||||
o.Roles = CHANNEL_ROLE_ADMIN
|
||||
o.NotifyLevel = "junk"
|
||||
o.NotifyProps["desktop"] = "junk"
|
||||
if err := o.IsValid(); err == nil {
|
||||
t.Fatal("should be invalid")
|
||||
}
|
||||
|
||||
o.NotifyLevel = "123456789012345678901"
|
||||
o.NotifyProps["desktop"] = "123456789012345678901"
|
||||
if err := o.IsValid(); err == nil {
|
||||
t.Fatal("should be invalid")
|
||||
}
|
||||
|
||||
o.NotifyLevel = CHANNEL_NOTIFY_ALL
|
||||
o.NotifyProps["desktop"] = CHANNEL_NOTIFY_ALL
|
||||
if err := o.IsValid(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user