PLT-3921 Fix System Console Recent Active Users (#3856)
* PLT-3921 System Console Recent Active Users
Этот коммит содержится в:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user