From 4e6cc846a618ecef5c101727bbd03f6674044ab7 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 17 Jan 2018 12:38:37 -0600 Subject: Finally remove utils.Cfg (#8113) * finally remove utils.Cfg * fix compile error * another test compilation fix --- api/oauth_test.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'api/oauth_test.go') diff --git a/api/oauth_test.go b/api/oauth_test.go index 8309b67cc..ec1e557da 100644 --- a/api/oauth_test.go +++ b/api/oauth_test.go @@ -88,8 +88,6 @@ func TestOAuthRegisterApp(t *testing.T) { t.Fatal("should have failed. not enough permissions") } - adminOnly := *th.App.Config().ServiceSettings.EnableOnlyAdminIntegrations - defer th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = adminOnly }) th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = false }) th.LoginBasic() @@ -741,9 +739,6 @@ func TestOAuthComplete(t *testing.T) { // We are going to use mattermost as the provider emulating gitlab th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableOAuthServiceProvider = true }) - - adminOnly := *th.App.Config().ServiceSettings.EnableOnlyAdminIntegrations - defer th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = adminOnly }) th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableOnlyAdminIntegrations = false }) oauthApp := &model.OAuthApp{ -- cgit v1.2.3-1-g7c22