1
0

chore(deps): update golangci-lint rules

This commit is contained in:
kolaente
2023-12-19 13:34:31 +01:00
parent 48a173a563
commit c05f51b923
60 changed files with 999 additions and 921 deletions

View File

@ -20,6 +20,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewMail(t *testing.T) {
@ -97,7 +98,7 @@ func TestRenderMail(t *testing.T) {
Line("And one more, because why not?")
mailopts, err := RenderMail(mail)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, mail.from, mailopts.From)
assert.Equal(t, mail.to, mailopts.To)

View File

@ -20,7 +20,8 @@ import (
"testing"
"code.vikunja.io/api/pkg/db"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"xorm.io/xorm/schemas"
)
@ -73,7 +74,7 @@ func TestNotify(t *testing.T) {
s := db.NewSession()
defer s.Close()
_, err := s.Exec("delete from notifications")
assert.NoError(t, err)
require.NoError(t, err)
tn := &testNotification{
Test: "somethingsomething",
@ -84,7 +85,7 @@ func TestNotify(t *testing.T) {
}
err = Notify(tnf, tn)
assert.NoError(t, err)
require.NoError(t, err)
vals := map[string]interface{}{
"notifiable_id": 42,
"notification": "'{\"other_value\":42,\"test\":\"somethingsomething\"}'",
@ -107,7 +108,7 @@ func TestNotify(t *testing.T) {
s := db.NewSession()
defer s.Close()
_, err := s.Exec("delete from notifications")
assert.NoError(t, err)
require.NoError(t, err)
tn := &testNotification{
Test: "somethingsomething",
@ -118,7 +119,7 @@ func TestNotify(t *testing.T) {
}
err = Notify(tnf, tn)
assert.NoError(t, err)
require.NoError(t, err)
db.AssertMissing(t, "notifications", map[string]interface{}{
"notifiable_id": 42,
})