mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Some repository refactors (#17950)
* some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
)
|
||||
@@ -18,8 +18,8 @@ func TestRepoWatch(t *testing.T) {
|
||||
// Test round-trip auto-watch
|
||||
setting.Service.AutoWatchOnChanges = true
|
||||
session := loginUser(t, "user2")
|
||||
unittest.AssertNotExistsBean(t, &models.Watch{UserID: 2, RepoID: 3})
|
||||
unittest.AssertNotExistsBean(t, &repo_model.Watch{UserID: 2, RepoID: 3})
|
||||
testEditFile(t, session, "user3", "repo3", "master", "README.md", "Hello, World (Edited for watch)\n")
|
||||
unittest.AssertExistsAndLoadBean(t, &models.Watch{UserID: 2, RepoID: 3, Mode: models.RepoWatchModeAuto})
|
||||
unittest.AssertExistsAndLoadBean(t, &repo_model.Watch{UserID: 2, RepoID: 3, Mode: repo_model.WatchModeAuto})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user