0
0
mirror of https://github.com/thegeeklab/wp-github-comment.git synced 2024-06-02 18:39:39 +02:00

test: use static errors

This commit is contained in:
Robert Kaussow 2024-05-12 10:59:19 +02:00
parent 6ddf49beb4
commit 96d603d111
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 3 additions and 7 deletions

View File

@ -95,9 +95,3 @@ run:
linters-settings:
gofumpt:
extra-rules: true
issues:
exclude-rules:
- path: "_test.go"
linters:
- err113

View File

@ -12,6 +12,8 @@ import (
"github.com/thegeeklab/wp-github-comment/github/mocks"
)
var ErrInternalServerError = errors.New("internal server error")
func TestGithubIssue_FindComment(t *testing.T) {
tests := []struct {
name string
@ -156,7 +158,7 @@ func TestGithubIssue_AddComment(t *testing.T) {
Message: "test message",
Update: false,
},
wantErr: errors.New("internal server error"),
wantErr: ErrInternalServerError,
},
}