aboutsummaryrefslogtreecommitdiffstats
path: root/modules/webhook/dingtalk_test.go
diff options
context:
space:
mode:
authorStephen Solka <solka@hey.com>2020-07-19 05:53:40 -0400
committerGitHub <noreply@github.com>2020-07-19 12:53:40 +0300
commit54513452a1134de670467e5a8d5cebd768b3c7e4 (patch)
tree48e39d2e52daa88cf93431dd6b0642e482a5e018 /modules/webhook/dingtalk_test.go
parentb609a25014cf732ec444c132dc9fb892818281dc (diff)
downloadgitea-54513452a1134de670467e5a8d5cebd768b3c7e4.tar.gz
gitea-54513452a1134de670467e5a8d5cebd768b3c7e4.zip
prefer NoError/Error over Nil/NotNil (#12271)
Diffstat (limited to 'modules/webhook/dingtalk_test.go')
-rw-r--r--modules/webhook/dingtalk_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/webhook/dingtalk_test.go b/modules/webhook/dingtalk_test.go
index f50cb9a587..4cb7a913e6 100644
--- a/modules/webhook/dingtalk_test.go
+++ b/modules/webhook/dingtalk_test.go
@@ -17,14 +17,14 @@ func TestGetDingTalkIssuesPayload(t *testing.T) {
p.Action = api.HookIssueOpened
pl, err := getDingtalkIssuesPayload(p)
- require.Nil(t, err)
+ require.NoError(t, err)
require.NotNil(t, pl)
assert.Equal(t, "#2 crash", pl.ActionCard.Title)
assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\r\n\r\n", pl.ActionCard.Text)
p.Action = api.HookIssueClosed
pl, err = getDingtalkIssuesPayload(p)
- require.Nil(t, err)
+ require.NoError(t, err)
require.NotNil(t, pl)
assert.Equal(t, "#2 crash", pl.ActionCard.Title)
assert.Equal(t, "[test/repo] Issue closed: #2 crash by user1\r\n\r\n", pl.ActionCard.Text)