aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_redirect_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo_redirect_test.go')
-rw-r--r--models/repo_redirect_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/models/repo_redirect_test.go b/models/repo_redirect_test.go
index bf42d4854c..a9d3cc1494 100644
--- a/models/repo_redirect_test.go
+++ b/models/repo_redirect_test.go
@@ -19,7 +19,7 @@ func TestLookupRepoRedirect(t *testing.T) {
assert.NoError(t, err)
assert.EqualValues(t, 1, repoID)
- _, err = LookupRepoRedirect(db.NonexistentID, "doesnotexist")
+ _, err = LookupRepoRedirect(unittest.NonexistentID, "doesnotexist")
assert.True(t, IsErrRepoRedirectNotExist(err))
}
@@ -27,15 +27,15 @@ func TestNewRepoRedirect(t *testing.T) {
// redirect to a completely new name
assert.NoError(t, unittest.PrepareTestDatabase())
- repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
assert.NoError(t, newRepoRedirect(db.GetEngine(db.DefaultContext), repo.OwnerID, repo.ID, repo.Name, "newreponame"))
- db.AssertExistsAndLoadBean(t, &RepoRedirect{
+ unittest.AssertExistsAndLoadBean(t, &RepoRedirect{
OwnerID: repo.OwnerID,
LowerName: repo.LowerName,
RedirectRepoID: repo.ID,
})
- db.AssertExistsAndLoadBean(t, &RepoRedirect{
+ unittest.AssertExistsAndLoadBean(t, &RepoRedirect{
OwnerID: repo.OwnerID,
LowerName: "oldrepo1",
RedirectRepoID: repo.ID,
@@ -46,15 +46,15 @@ func TestNewRepoRedirect2(t *testing.T) {
// redirect to previously used name
assert.NoError(t, unittest.PrepareTestDatabase())
- repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
assert.NoError(t, newRepoRedirect(db.GetEngine(db.DefaultContext), repo.OwnerID, repo.ID, repo.Name, "oldrepo1"))
- db.AssertExistsAndLoadBean(t, &RepoRedirect{
+ unittest.AssertExistsAndLoadBean(t, &RepoRedirect{
OwnerID: repo.OwnerID,
LowerName: repo.LowerName,
RedirectRepoID: repo.ID,
})
- db.AssertNotExistsBean(t, &RepoRedirect{
+ unittest.AssertNotExistsBean(t, &RepoRedirect{
OwnerID: repo.OwnerID,
LowerName: "oldrepo1",
RedirectRepoID: repo.ID,
@@ -65,10 +65,10 @@ func TestNewRepoRedirect3(t *testing.T) {
// redirect for a previously-unredirected repo
assert.NoError(t, unittest.PrepareTestDatabase())
- repo := db.AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository)
+ repo := unittest.AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository)
assert.NoError(t, newRepoRedirect(db.GetEngine(db.DefaultContext), repo.OwnerID, repo.ID, repo.Name, "newreponame"))
- db.AssertExistsAndLoadBean(t, &RepoRedirect{
+ unittest.AssertExistsAndLoadBean(t, &RepoRedirect{
OwnerID: repo.OwnerID,
LowerName: repo.LowerName,
RedirectRepoID: repo.ID,