MM-14416: Adds new fields to Channels and Teams for use by LDAP groups removals. (#10450)
* MM-14416: Updates tests. * MM-14416: Adds new fields to models and patches. * MM-14416: Adds upgrade operations. * MM-14416: Removes the 'is' from the new field names. * MM-14416: Some fmting and removes API test change for now. * MM-14416: Adds team patch test. * MM-14416: Using sql.NullBool. * MM-14416: Using sql.NullBool.
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
683f215bd9
Коммит
16a9489bbb
@@ -37,11 +37,12 @@ func TestChannelCopy(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChannelPatch(t *testing.T) {
|
||||
p := &ChannelPatch{Name: new(string), DisplayName: new(string), Header: new(string), Purpose: new(string)}
|
||||
p := &ChannelPatch{Name: new(string), DisplayName: new(string), Header: new(string), Purpose: new(string), GroupConstrained: new(bool)}
|
||||
*p.Name = NewId()
|
||||
*p.DisplayName = NewId()
|
||||
*p.Header = NewId()
|
||||
*p.Purpose = NewId()
|
||||
*p.GroupConstrained = true
|
||||
|
||||
o := Channel{Id: NewId(), Name: NewId()}
|
||||
o.Patch(p)
|
||||
@@ -58,6 +59,9 @@ func TestChannelPatch(t *testing.T) {
|
||||
if *p.Purpose != o.Purpose {
|
||||
t.Fatal("do not match")
|
||||
}
|
||||
if *p.GroupConstrained != o.GroupConstrained.Bool {
|
||||
t.Fatalf("expected %v got %v", *p.GroupConstrained, o.GroupConstrained.Bool)
|
||||
}
|
||||
}
|
||||
|
||||
func TestChannelIsValid(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user