Another team update
Этот коммит содержится в:
@@ -219,16 +219,29 @@ func TestTeamStoreSearchOpen(t *testing.T) {
|
||||
o1.Name = "zz" + model.NewId() + "a"
|
||||
o1.Email = model.NewId() + "@nowhere.com"
|
||||
o1.Type = model.TEAM_OPEN
|
||||
o1.AllowOpenInvite = true
|
||||
|
||||
if err := (<-store.Team().Save(&o1)).Err; err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
o2 := model.Team{}
|
||||
o2.DisplayName = "ADisplayName" + model.NewId()
|
||||
o2.Name = "zz" + model.NewId() + "a"
|
||||
o2.Email = model.NewId() + "@nowhere.com"
|
||||
o2.Type = model.TEAM_OPEN
|
||||
o2.AllowOpenInvite = false
|
||||
|
||||
if err := (<-store.Team().Save(&o2)).Err; err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
p2 := model.Team{}
|
||||
p2.DisplayName = "BDisplayName" + model.NewId()
|
||||
p2.Name = "b" + model.NewId() + "b"
|
||||
p2.Email = model.NewId() + "@nowhere.com"
|
||||
p2.Type = model.TEAM_INVITE
|
||||
p2.AllowOpenInvite = true
|
||||
|
||||
if err := (<-store.Team().Save(&p2)).Err; err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -279,6 +292,14 @@ func TestTeamStoreSearchOpen(t *testing.T) {
|
||||
if len(r1.Data.([]*model.Team)) != 0 {
|
||||
t.Fatal("should have not returned a team")
|
||||
}
|
||||
|
||||
r1 = <-store.Team().SearchOpen(o2.DisplayName)
|
||||
if r1.Err != nil {
|
||||
t.Fatal(r1.Err)
|
||||
}
|
||||
if len(r1.Data.([]*model.Team)) != 0 {
|
||||
t.Fatal("should have not returned a team")
|
||||
}
|
||||
}
|
||||
|
||||
func TestTeamStoreGetByIniviteId(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user