Этот коммит содержится в:
JoramWilander
2015-06-22 14:35:34 -04:00
родитель 5ebeaffe64
Коммит c3ebd3e6be

Просмотреть файл

@@ -679,6 +679,8 @@ func TestUpdateNotifyLevel(t *testing.T) {
data["user_id"] = user.Id data["user_id"] = user.Id
data["notify_level"] = model.CHANNEL_NOTIFY_MENTION data["notify_level"] = model.CHANNEL_NOTIFY_MENTION
timeBeforeUpdate := model.GetMillis()
if _, err := Client.UpdateNotifyLevel(data); err != nil { if _, err := Client.UpdateNotifyLevel(data); err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -689,6 +691,10 @@ func TestUpdateNotifyLevel(t *testing.T) {
t.Fatal("NotifyLevel did not update properly") t.Fatal("NotifyLevel did not update properly")
} }
if rdata.Members[channel1.Id].LastUpdateAt <= timeBeforeUpdate {
t.Fatal("LastUpdateAt did not update")
}
data["user_id"] = "junk" data["user_id"] = "junk"
if _, err := Client.UpdateNotifyLevel(data); err == nil { if _, err := Client.UpdateNotifyLevel(data); err == nil {
t.Fatal("Should have errored - bad user id") t.Fatal("Should have errored - bad user id")
@@ -735,7 +741,7 @@ func TestUpdateNotifyLevel(t *testing.T) {
} }
func TestFuzzyChannel(t *testing.T) { func TestFuzzyChannel(t *testing.T) {
Setup(); Setup()
team := &model.Team{Name: "Name", Domain: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN} team := &model.Team{Name: "Name", Domain: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
team = Client.Must(Client.CreateTeam(team)).Data.(*model.Team) team = Client.Must(Client.CreateTeam(team)).Data.(*model.Team)