summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-06-29 08:14:02 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-06-29 08:14:02 -0400
commit0792eb18d535410b456f3cc569e243efb85a47b6 (patch)
tree4ea6caf1e890703b4bb4e727ebce0099dfc88327 /api
parentafb62bb40a012a7e00707f384020e1431abca1ed (diff)
parent366557b101f318b69ad854349c2414783ce1c82a (diff)
downloadchat-0792eb18d535410b456f3cc569e243efb85a47b6.tar.gz
chat-0792eb18d535410b456f3cc569e243efb85a47b6.tar.bz2
chat-0792eb18d535410b456f3cc569e243efb85a47b6.zip
Merge pull request #49 from mattermost/mm-1316
fixes mm-1316 improves channel notifications UI and updates channellist etag
Diffstat (limited to 'api')
-rw-r--r--api/channel_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/api/channel_test.go b/api/channel_test.go
index e8aaf4e3f..2e2e3683a 100644
--- a/api/channel_test.go
+++ b/api/channel_test.go
@@ -679,6 +679,8 @@ func TestUpdateNotifyLevel(t *testing.T) {
data["user_id"] = user.Id
data["notify_level"] = model.CHANNEL_NOTIFY_MENTION
+ timeBeforeUpdate := model.GetMillis()
+
if _, err := Client.UpdateNotifyLevel(data); err != nil {
t.Fatal(err)
}
@@ -689,6 +691,10 @@ func TestUpdateNotifyLevel(t *testing.T) {
t.Fatal("NotifyLevel did not update properly")
}
+ if rdata.Members[channel1.Id].LastUpdateAt <= timeBeforeUpdate {
+ t.Fatal("LastUpdateAt did not update")
+ }
+
data["user_id"] = "junk"
if _, err := Client.UpdateNotifyLevel(data); err == nil {
t.Fatal("Should have errored - bad user id")
@@ -735,7 +741,7 @@ func TestUpdateNotifyLevel(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 = Client.Must(Client.CreateTeam(team)).Data.(*model.Team)
@@ -747,9 +753,9 @@ func TestFuzzyChannel(t *testing.T) {
Client.LoginByEmail(team.Domain, user.Email, "pwd")
// Strings that should pass as acceptable channel names
- var fuzzyStringsPass = []string {
+ var fuzzyStringsPass = []string{
"*", "?", ".", "}{][)(><", "{}[]()<>",
-
+
"qahwah ( قهوة)",
"שָׁלוֹם עֲלֵיכֶם",
"Ramen チャーシュー chāshū",