mirror of
https://github.com/thegeeklab/wp-github-comment.git
synced 2024-11-24 13:00:41 +00:00
test: use static errors
This commit is contained in:
parent
6ddf49beb4
commit
96d603d111
@ -95,9 +95,3 @@ run:
|
|||||||
linters-settings:
|
linters-settings:
|
||||||
gofumpt:
|
gofumpt:
|
||||||
extra-rules: true
|
extra-rules: true
|
||||||
|
|
||||||
issues:
|
|
||||||
exclude-rules:
|
|
||||||
- path: "_test.go"
|
|
||||||
linters:
|
|
||||||
- err113
|
|
||||||
|
@ -12,6 +12,8 @@ import (
|
|||||||
"github.com/thegeeklab/wp-github-comment/github/mocks"
|
"github.com/thegeeklab/wp-github-comment/github/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var ErrInternalServerError = errors.New("internal server error")
|
||||||
|
|
||||||
func TestGithubIssue_FindComment(t *testing.T) {
|
func TestGithubIssue_FindComment(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
@ -156,7 +158,7 @@ func TestGithubIssue_AddComment(t *testing.T) {
|
|||||||
Message: "test message",
|
Message: "test message",
|
||||||
Update: false,
|
Update: false,
|
||||||
},
|
},
|
||||||
wantErr: errors.New("internal server error"),
|
wantErr: ErrInternalServerError,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user