diff options
Diffstat (limited to 'api4/post_test.go')
-rw-r--r-- | api4/post_test.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/api4/post_test.go b/api4/post_test.go index de627d8bc..52326c4b0 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -489,16 +489,13 @@ func TestUpdatePost(t *testing.T) { isLicensed := utils.IsLicensed() license := utils.License() - allowEditPost := *th.App.Config().ServiceSettings.AllowEditPost defer func() { utils.SetIsLicensed(isLicensed) utils.SetLicense(license) - th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.AllowEditPost = allowEditPost }) }() utils.SetIsLicensed(true) utils.SetLicense(&model.License{Features: &model.Features{}}) utils.License().Features.SetDefaults() - th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.AllowEditPost = model.ALLOW_EDIT_POST_ALWAYS }) post := &model.Post{ChannelId: channel.Id, Message: "zz" + model.NewId() + "a"} rpost, resp := Client.CreatePost(post) @@ -571,18 +568,14 @@ func TestPatchPost(t *testing.T) { isLicensed := utils.IsLicensed() license := utils.License() - allowEditPost := *th.App.Config().ServiceSettings.AllowEditPost defer func() { utils.SetIsLicensed(isLicensed) utils.SetLicense(license) - th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.AllowEditPost = allowEditPost }) }() utils.SetIsLicensed(true) utils.SetLicense(&model.License{Features: &model.Features{}}) utils.License().Features.SetDefaults() - th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.AllowEditPost = model.ALLOW_EDIT_POST_ALWAYS }) - post := &model.Post{ ChannelId: channel.Id, IsPinned: true, |