summaryrefslogtreecommitdiffstats
path: root/api4/oauth_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-12-01 08:21:44 -0500
committerGitHub <noreply@github.com>2017-12-01 08:21:44 -0500
commit239e8df3f4e94e71c08863fbaca72172c594fa22 (patch)
tree7ce70e4a8e3977565dff89723e83b3d4563102ca /api4/oauth_test.go
parent965a1bf7847d717683377521f5e77adb590851cf (diff)
downloadchat-239e8df3f4e94e71c08863fbaca72172c594fa22.tar.gz
chat-239e8df3f4e94e71c08863fbaca72172c594fa22.tar.bz2
chat-239e8df3f4e94e71c08863fbaca72172c594fa22.zip
Fix oauth app update (#7913)
Diffstat (limited to 'api4/oauth_test.go')
-rw-r--r--api4/oauth_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/api4/oauth_test.go b/api4/oauth_test.go
index 8658e86e9..8dd602456 100644
--- a/api4/oauth_test.go
+++ b/api4/oauth_test.go
@@ -164,6 +164,13 @@ func TestUpdateOAuthApp(t *testing.T) {
t.Fatal("IsTrusted should have updated")
}
+ th.LoginBasic2()
+ updatedApp.CreatorId = th.BasicUser2.Id
+ _, resp = Client.UpdateOAuthApp(oapp)
+ CheckForbiddenStatus(t, resp)
+
+ th.LoginBasic()
+
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = false })
th.App.SetDefaultRolesBasedOnConfig()
_, resp = Client.UpdateOAuthApp(oapp)