summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-05-04 06:31:42 -0700
committerChristopher Speller <crspeller@gmail.com>2016-05-04 09:31:42 -0400
commit6611229cd7bd3cdfc0082c0a581145aaac0ab322 (patch)
treedb6670a8c2716179bfe6e07b82588d83d3afb6bd /api/user_test.go
parent6b06f49e8910ed44f619adad15ab268758312852 (diff)
downloadchat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.gz
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.bz2
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.zip
PLT-2707 Adding option to show DM list from all of server (#2871)
* PLT-2707 Adding option to show DM list from all of server * Fixing loc
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/api/user_test.go b/api/user_test.go
index ee13f43f2..629f7d257 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -395,6 +395,22 @@ func TestGetDirectProfiles(t *testing.T) {
}
}
+func TestGetProfilesForDirectMessageList(t *testing.T) {
+ th := Setup().InitBasic()
+
+ th.BasicClient.Must(th.BasicClient.CreateDirectChannel(th.BasicUser2.Id))
+
+ if result, err := th.BasicClient.GetProfilesForDirectMessageList(th.BasicTeam.Id); err != nil {
+ t.Fatal(err)
+ } else {
+ users := result.Data.(map[string]*model.User)
+
+ if len(users) < 1 {
+ t.Fatal("map was wrong length")
+ }
+ }
+}
+
func TestGetAudits(t *testing.T) {
th := Setup()
Client := th.CreateClient()