summaryrefslogtreecommitdiffstats
path: root/models/repo/fork_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/fork_test.go')
-rw-r--r--models/repo/fork_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/models/repo/fork_test.go b/models/repo/fork_test.go
index e8dca204cc..dd12429cc4 100644
--- a/models/repo/fork_test.go
+++ b/models/repo/fork_test.go
@@ -11,23 +11,24 @@ import (
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestGetUserFork(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
+ require.NoError(t, unittest.PrepareTestDatabase())
// User13 has repo 11 forked from repo10
repo, err := repo_model.GetRepositoryByID(db.DefaultContext, 10)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.NotNil(t, repo)
repo, err = repo_model.GetUserFork(db.DefaultContext, repo.ID, 13)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.NotNil(t, repo)
repo, err = repo_model.GetRepositoryByID(db.DefaultContext, 9)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.NotNil(t, repo)
repo, err = repo_model.GetUserFork(db.DefaultContext, repo.ID, 13)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.Nil(t, repo)
}