summaryrefslogtreecommitdiffstats
path: root/app/channel_test.go
diff options
context:
space:
mode:
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)
+}