summaryrefslogtreecommitdiffstats
path: root/api/post_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-15 18:54:24 -0500
committerGitHub <noreply@github.com>2017-02-15 18:54:24 -0500
commitdb2966b7cb3111ff1b3cadfbec1221343b0e8629 (patch)
treee2b64183860e98807a4d77401db3dcdf61d2a6a7 /api/post_test.go
parent745e2f4923c653c7b9bff990375d9f3f67b4c212 (diff)
downloadchat-db2966b7cb3111ff1b3cadfbec1221343b0e8629.tar.gz
chat-db2966b7cb3111ff1b3cadfbec1221343b0e8629.tar.bz2
chat-db2966b7cb3111ff1b3cadfbec1221343b0e8629.zip
Remove MakeDirectChannelVisible and add client handling for showing DMs (#5430)
Diffstat (limited to 'api/post_test.go')
-rw-r--r--api/post_test.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/api/post_test.go b/api/post_test.go
index 260a4eb2c..ddcce2e59 100644
--- a/api/post_test.go
+++ b/api/post_test.go
@@ -1058,42 +1058,6 @@ func TestFuzzyPosts(t *testing.T) {
}
}
-func TestMakeDirectChannelVisible(t *testing.T) {
- th := Setup().InitBasic()
- Client := th.BasicClient
- team := th.BasicTeam
- user1 := th.BasicUser
- user2 := th.BasicUser2
-
- th.LoginBasic2()
-
- preferences := &model.Preferences{
- {
- UserId: user2.Id,
- Category: model.PREFERENCE_CATEGORY_DIRECT_CHANNEL_SHOW,
- Name: user1.Id,
- Value: "false",
- },
- }
- Client.Must(Client.SetPreferences(preferences))
-
- Client.Must(Client.Logout())
- th.LoginBasic()
- th.BasicClient.SetTeamId(team.Id)
-
- channel := Client.Must(Client.CreateDirectChannel(user2.Id)).Data.(*model.Channel)
-
- if err := app.MakeDirectChannelVisible(channel.Id); err != nil {
- t.Fatal(err)
- }
-
- if result, err := Client.GetPreference(model.PREFERENCE_CATEGORY_DIRECT_CHANNEL_SHOW, user2.Id); err != nil {
- t.Fatal("Errored trying to set direct channel to be visible for user1")
- } else if pref := result.Data.(*model.Preference); pref.Value != "true" {
- t.Fatal("Failed to set direct channel to be visible for user1")
- }
-}
-
func TestGetFlaggedPosts(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient