diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-10-31 12:00:21 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-10-31 16:00:21 +0000 |
commit | 06ec648cf30e3968c0fdb2514c8d59dff97c757c (patch) | |
tree | c801a9bbbdeca6704b91d5d093cb937db5cd9d00 /api4/post_test.go | |
parent | 6886de04d4215ea45ae535b64a604a79292bff77 (diff) | |
download | chat-06ec648cf30e3968c0fdb2514c8d59dff97c757c.tar.gz chat-06ec648cf30e3968c0fdb2514c8d59dff97c757c.tar.bz2 chat-06ec648cf30e3968c0fdb2514c8d59dff97c757c.zip |
PLT-7978 Add websocket event for user role update (#7745)
* Add websocket event for user role update
* Fix tests
* More test fixes
Diffstat (limited to 'api4/post_test.go')
-rw-r--r-- | api4/post_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api4/post_test.go b/api4/post_test.go index 6f195296a..15553137a 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -292,7 +292,7 @@ func TestCreatePostPublic(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL_PUBLIC.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL_PUBLIC.Id, false) th.App.InvalidateAllCaches() Client.Login(user.Email, user.Password) @@ -304,7 +304,7 @@ func TestCreatePostPublic(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id, false) th.App.JoinUserToTeam(th.BasicTeam, ruser, "") th.App.UpdateTeamMemberRoles(th.BasicTeam.Id, ruser.Id, model.ROLE_TEAM_USER.Id+" "+model.ROLE_TEAM_POST_ALL_PUBLIC.Id) th.App.InvalidateAllCaches() @@ -339,7 +339,7 @@ func TestCreatePostAll(t *testing.T) { _, resp = Client.CreatePost(post) CheckForbiddenStatus(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id+" "+model.ROLE_SYSTEM_POST_ALL.Id, false) th.App.InvalidateAllCaches() Client.Login(user.Email, user.Password) @@ -355,7 +355,7 @@ func TestCreatePostAll(t *testing.T) { _, resp = Client.CreatePost(post) CheckNoError(t, resp) - th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id) + th.App.UpdateUserRoles(ruser.Id, model.ROLE_SYSTEM_USER.Id, false) th.App.JoinUserToTeam(th.BasicTeam, ruser, "") th.App.UpdateTeamMemberRoles(th.BasicTeam.Id, ruser.Id, model.ROLE_TEAM_USER.Id+" "+model.ROLE_TEAM_POST_ALL.Id) th.App.InvalidateAllCaches() |