diff options
author | Daniel Schalla <daniel@schalla.me> | 2018-09-03 14:08:40 +0200 |
---|---|---|
committer | Jesús Espino <jespinog@gmail.com> | 2018-09-03 14:08:40 +0200 |
commit | 531897b1f0d8176c1f983f921f1d1de618db0131 (patch) | |
tree | 0f01811eee640141b6a1959ed64a7b250fd59d47 /api4/role_test.go | |
parent | 68fdaaa995555e93f067efc3a07f1866e43ae665 (diff) | |
download | chat-531897b1f0d8176c1f983f921f1d1de618db0131.tar.gz chat-531897b1f0d8176c1f983f921f1d1de618db0131.tar.bz2 chat-531897b1f0d8176c1f983f921f1d1de618db0131.zip |
add megacheck as makefile target (#9288)
Fix code issues in channel_test.go
Fix Channel Test Issues detected by Megacheck
Fix API Emoji Test Issues detected by Megacheck
Fixed API Issues Reported by Megacheck
Fixed App issues reported by megacheck
Remaining fixes
removed test added by mistake from old HEAD
gofmt
Store Fixes
simplified returns
Fix test for multi member channel delete
revert to delete unused function
Diffstat (limited to 'api4/role_test.go')
-rw-r--r-- | api4/role_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/api4/role_test.go b/api4/role_test.go index 8149ff3c6..2a8008dc9 100644 --- a/api4/role_test.go +++ b/api4/role_test.go @@ -130,7 +130,7 @@ func TestGetRolesByNames(t *testing.T) { assert.Contains(t, received, role3) // Check a list of non-existent roles. - received, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId()}) + _, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId()}) CheckNoError(t, resp) // Empty list should error. @@ -138,11 +138,11 @@ func TestGetRolesByNames(t *testing.T) { CheckBadRequestStatus(t, resp) // Invalid role name should error. - received, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId(), "!!!!!!"}) + _, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId(), "!!!!!!"}) CheckBadRequestStatus(t, resp) // Empty/whitespace rolenames should be ignored. - received, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId(), "", " "}) + _, resp = th.Client.GetRolesByNames([]string{model.NewId(), model.NewId(), "", " "}) CheckNoError(t, resp) } @@ -178,16 +178,16 @@ func TestPatchRole(t *testing.T) { assert.Equal(t, received.SchemeManaged, role.SchemeManaged) // Check a no-op patch succeeds. - received, resp = th.SystemAdminClient.PatchRole(role.Id, patch) + _, resp = th.SystemAdminClient.PatchRole(role.Id, patch) CheckNoError(t, resp) - received, resp = th.SystemAdminClient.PatchRole("junk", patch) + _, resp = th.SystemAdminClient.PatchRole("junk", patch) CheckBadRequestStatus(t, resp) - received, resp = th.Client.PatchRole(model.NewId(), patch) + _, resp = th.Client.PatchRole(model.NewId(), patch) CheckNotFoundStatus(t, resp) - received, resp = th.Client.PatchRole(role.Id, patch) + _, resp = th.Client.PatchRole(role.Id, patch) CheckForbiddenStatus(t, resp) // Check a change that the license would not allow. @@ -195,7 +195,7 @@ func TestPatchRole(t *testing.T) { Permissions: &[]string{"manage_system", "manage_webhooks"}, } - received, resp = th.SystemAdminClient.PatchRole(role.Id, patch) + _, resp = th.SystemAdminClient.PatchRole(role.Id, patch) CheckNotImplementedStatus(t, resp) // Add a license. |