PLT-3921 Fix System Console Recent Active Users (#3856)

* PLT-3921 System Console Recent Active Users
Этот коммит содержится в:
enahum
2016-09-06 15:48:43 -03:00
коммит произвёл GitHub
родитель 9a9ae3dcd1
Коммит 35b816b922
9 изменённых файлов: 99 добавлений и 1 удалений

Просмотреть файл

@@ -527,3 +527,18 @@ func TestAdminLdapSyncNow(t *testing.T) {
t.Fatal("Returned Failure")
}
}
func TestGetRecentlyActiveUsers(t *testing.T) {
th := Setup().InitBasic()
user1Id := th.BasicUser.Id
user2Id := th.BasicUser2.Id
if userMap, err := th.BasicClient.GetRecentlyActiveUsers(th.BasicTeam.Id); err != nil {
t.Fatal(err)
} else if len(userMap.Data.(map[string]*model.User)) != 2 {
t.Fatal("should have been 2")
} else if userMap.Data.(map[string]*model.User)[user1Id].Id != user1Id || userMap.Data.(map[string]*model.User)[user2Id].Id != user2Id {
t.Fatal("should have been valid")
}
}