Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added testcase for some functions in server/command.go #845

Open
wants to merge 10 commits into
base: add_server/api.go_testcases
Choose a base branch
from

Conversation

Kshitij-Katiyar
Copy link
Contributor

Summary

Unit test cases for the following functions in server/command.go file were added

  • GetMutedUsernames
  • HandleMuteList
  • Contains
  • HandleMuteAdd
  • HandleUnmute
  • HandleUnmuteAll

@Kshitij-Katiyar Kshitij-Katiyar added the 2: Dev Review Requires review by a core committer label Nov 4, 2024
@Kshitij-Katiyar Kshitij-Katiyar self-assigned this Nov 4, 2024
…attermost-plugin-github into add_server/command.go_testcases
…attermost-plugin-github into add_server/command.go_testcases
server/plugin/command.go Outdated Show resolved Hide resolved
Copy link
Member

@wiggin77 wiggin77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

server/plugin/command.go Outdated Show resolved Hide resolved
server/plugin/command.go Outdated Show resolved Hide resolved
server/plugin/command_test.go Show resolved Hide resolved
}

func TestHandleUnmuteAll(t *testing.T) {
mockKvStore, mockAPI, _, _, _ := GetTestSetup(t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mockAPI is never used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used in p := getPluginTest(mockAPI, mockKvStore)

@Kshitij-Katiyar Kshitij-Katiyar changed the base branch from add_server/api.go_testcases to master January 16, 2025 07:54
@Kshitij-Katiyar Kshitij-Katiyar changed the base branch from master to add_server/api.go_testcases January 16, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants