summaryrefslogtreecommitdiffstats
path: root/app/channel_test.go
diff options
context:
space:
mode:
authorDruhin Bala <theblueskies@users.noreply.github.com>2018-07-18 05:49:48 -0500
committerGeorge Goldberg <george@gberg.me>2018-07-18 11:49:48 +0100
commit301e7eb1c424be9c3fb00401fdc2ea387bddee05 (patch)
tree7add86db67f23fc1749709af770d97b00afe2c5e /app/channel_test.go
parentb367b1ff4064557deacae0f7ecf77fae4624b8c6 (diff)
downloadchat-301e7eb1c424be9c3fb00401fdc2ea387bddee05.tar.gz
chat-301e7eb1c424be9c3fb00401fdc2ea387bddee05.tar.bz2
chat-301e7eb1c424be9c3fb00401fdc2ea387bddee05.zip
MM-10699 Add channel renaming to CLI (#9094)
Diffstat (limited to 'app/channel_test.go')
-rw-r--r--app/channel_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/channel_test.go b/app/channel_test.go
index 4e6aaaf52..82c9e07ad 100644
--- a/app/channel_test.go
+++ b/app/channel_test.go
@@ -605,3 +605,17 @@ func TestFillInChannelProps(t *testing.T) {
}
})
}
+
+func TestRenameChannel(t *testing.T) {
+ th := Setup().InitBasic()
+ defer th.TearDown()
+
+ channel := th.createChannel(th.BasicTeam, model.CHANNEL_OPEN)
+
+ channel, err := th.App.RenameChannel(channel, "newchannelname", "New Display Name")
+ if err != nil {
+ t.Fatal("Failed to update channel name. Error: " + err.Error())
+ }
+ assert.Equal(t, "newchannelname", channel.Name)
+ assert.Equal(t, "New Display Name", channel.DisplayName)
+}