diff options
author | Stephen Solka <solka@hey.com> | 2020-07-19 05:53:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-19 12:53:40 +0300 |
commit | 54513452a1134de670467e5a8d5cebd768b3c7e4 (patch) | |
tree | 48e39d2e52daa88cf93431dd6b0642e482a5e018 /modules/webhook/dingtalk_test.go | |
parent | b609a25014cf732ec444c132dc9fb892818281dc (diff) | |
download | gitea-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.go | 4 |
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) |