summaryrefslogtreecommitdiffstats
path: root/models/repo_transfer_test.go
diff options
context:
space:
mode:
authorTheFox0x7 <thefox0x7@gmail.com>2024-07-30 21:41:10 +0200
committerEarl Warren <earl-warren@noreply.codeberg.org>2024-07-30 21:41:10 +0200
commit4de909747bdf322bbb37d500b9705d7a3a050b78 (patch)
tree62dad5d457c227628877d235f0105db9ae4bc200 /models/repo_transfer_test.go
parentMerge pull request 'Implement external release assets' (#1445) from maltejur/... (diff)
downloadforgejo-4de909747bdf322bbb37d500b9705d7a3a050b78.tar.xz
forgejo-4de909747bdf322bbb37d500b9705d7a3a050b78.zip
Add testifylint to lint checks (#4535)
go-require lint is ignored for now Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
Diffstat (limited to 'models/repo_transfer_test.go')
-rw-r--r--models/repo_transfer_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo_transfer_test.go b/models/repo_transfer_test.go
index 7ef29fae1f..6b6d5a8098 100644
--- a/models/repo_transfer_test.go
+++ b/models/repo_transfer_test.go
@@ -11,16 +11,17 @@ import (
user_model "code.gitea.io/gitea/models/user"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestGetPendingTransferIDs(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
+ require.NoError(t, unittest.PrepareTestDatabase())
doer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3})
reciepient := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
pendingTransfer := unittest.AssertExistsAndLoadBean(t, &RepoTransfer{RecipientID: reciepient.ID, DoerID: doer.ID})
pendingTransferIDs, err := GetPendingTransferIDs(db.DefaultContext, reciepient.ID, doer.ID)
- assert.NoError(t, err)
+ require.NoError(t, err)
if assert.Len(t, pendingTransferIDs, 1) {
assert.EqualValues(t, pendingTransfer.ID, pendingTransferIDs[0])
}