summaryrefslogtreecommitdiffstats
path: root/api/post_test.go
diff options
context:
space:
mode:
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