mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
[TESTS] Move CreateDeclarativeRepo
to more accessible location
- This allows `CreateDeclarativeRepo` to be used by other testing packages such as E2EE testing. - Removes unused function in `services/webhook/sourcehut/builds_test.go`.
This commit is contained in:
parent
78e4736db6
commit
f78e397dd6
32 changed files with 196 additions and 258 deletions
|
@ -41,7 +41,7 @@ func TestAmbiguousCharacterDetection(t *testing.T) {
|
|||
session := loginUser(t, user2.Name)
|
||||
|
||||
// Prepare the environments. File view, commit view (diff), wiki page.
|
||||
repo, commitID, f := CreateDeclarativeRepo(t, user2, "",
|
||||
repo, commitID, f := tests.CreateDeclarativeRepo(t, user2, "",
|
||||
[]unit_model.Type{unit_model.TypeCode, unit_model.TypeWiki}, nil,
|
||||
[]*files_service.ChangeRepoFile{
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ func TestInHistoryButton(t *testing.T) {
|
|||
onGiteaRun(t, func(t *testing.T, u *url.URL) {
|
||||
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
|
||||
session := loginUser(t, user2.Name)
|
||||
repo, commitID, f := CreateDeclarativeRepo(t, user2, "",
|
||||
repo, commitID, f := tests.CreateDeclarativeRepo(t, user2, "",
|
||||
[]unit_model.Type{unit_model.TypeCode, unit_model.TypeWiki}, nil,
|
||||
[]*files_service.ChangeRepoFile{
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue