mirror of https://github.com/go-gitea/gitea
fix test
This commit is contained in:
parent
94025efd44
commit
274e5abdac
|
@ -89,7 +89,7 @@
|
|||
commit_id: 'cb24c347e328d83c1e0c3c908a6b2c0a2fcb8a3d'
|
||||
commit_message: 'add'
|
||||
commit_time: 1689838761
|
||||
pusher_id: 8
|
||||
pusher_id: 39
|
||||
is_deleted: false
|
||||
deleted_by_id: 0
|
||||
deleted_unix: 0
|
||||
|
@ -101,7 +101,7 @@
|
|||
commit_id: '65f1bf27bc3bf70f64657658635e66094edbcb4d'
|
||||
commit_message: 'Initial commit'
|
||||
commit_time: 1489927679
|
||||
pusher_id: 8
|
||||
pusher_id: 39
|
||||
is_deleted: false
|
||||
deleted_by_id: 0
|
||||
deleted_unix: 0
|
||||
|
|
|
@ -1665,8 +1665,8 @@
|
|||
|
||||
-
|
||||
id: 58
|
||||
owner_id: 8
|
||||
owner_name: user8
|
||||
owner_id: 39
|
||||
owner_name: user39
|
||||
lower_name: user_fork_repo1
|
||||
name: user_fork_repo1
|
||||
num_watches: 0
|
||||
|
|
|
@ -1406,3 +1406,40 @@
|
|||
repo_admin_change_team_access: false
|
||||
theme: ""
|
||||
keep_activity_private: false
|
||||
|
||||
-
|
||||
id: 39
|
||||
lower_name: user39
|
||||
name: user39
|
||||
full_name: user39
|
||||
email: user39@example.com
|
||||
keep_email_private: true
|
||||
email_notifications_preference: enabled
|
||||
passwd: ZogKvWdyEx:password
|
||||
passwd_hash_algo: dummy
|
||||
must_change_password: false
|
||||
login_source: 0
|
||||
login_name: user39
|
||||
type: 0
|
||||
salt: ZogKvWdyEx
|
||||
max_repo_creation: -1
|
||||
is_active: true
|
||||
is_admin: false
|
||||
is_restricted: false
|
||||
allow_git_hook: false
|
||||
allow_import_local: false
|
||||
allow_create_organization: true
|
||||
prohibit_login: false
|
||||
avatar: avatar39
|
||||
avatar_email: user39@example.com
|
||||
use_custom_avatar: false
|
||||
num_followers: 0
|
||||
num_following: 0
|
||||
num_stars: 0
|
||||
num_repos: 1
|
||||
num_teams: 0
|
||||
num_members: 0
|
||||
visibility: 0
|
||||
repo_admin_change_team_access: false
|
||||
theme: ""
|
||||
keep_activity_private: false
|
|
@ -191,8 +191,8 @@ func TestFindRecentlyPushedNewBranches(t *testing.T) {
|
|||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
|
||||
user5 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5})
|
||||
user8 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 8})
|
||||
user18 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 18})
|
||||
user39 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 39})
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@ -209,7 +209,7 @@ func TestFindRecentlyPushedNewBranches(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "new branch from user fork repo",
|
||||
actor: user8,
|
||||
actor: user39,
|
||||
count: 1,
|
||||
want: []string{"user-fork-new-commit"},
|
||||
},
|
||||
|
|
|
@ -205,7 +205,7 @@ func TestSearchRepository(t *testing.T) {
|
|||
{
|
||||
name: "PublicAndPrivateRepositoriesOfUser2IncludingCollaborative",
|
||||
opts: &repo_model.SearchRepoOptions{ListOptions: db.ListOptions{Page: 1, PageSize: 10}, OwnerID: 18, Private: true},
|
||||
count: 4,
|
||||
count: 5,
|
||||
},
|
||||
{
|
||||
name: "PublicAndPrivateRepositoriesOfUser3IncludingCollaborative",
|
||||
|
|
|
@ -170,7 +170,7 @@ func TestAPIGetAll(t *testing.T) {
|
|||
var apiOrgList []*api.Organization
|
||||
|
||||
DecodeJSON(t, resp, &apiOrgList)
|
||||
assert.Len(t, apiOrgList, 11)
|
||||
assert.Len(t, apiOrgList, 13)
|
||||
assert.Equal(t, "Limited Org 36", apiOrgList[1].FullName)
|
||||
assert.Equal(t, "limited", apiOrgList[1].Visibility)
|
||||
|
||||
|
@ -179,7 +179,7 @@ func TestAPIGetAll(t *testing.T) {
|
|||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
DecodeJSON(t, resp, &apiOrgList)
|
||||
assert.Len(t, apiOrgList, 7)
|
||||
assert.Len(t, apiOrgList, 8)
|
||||
assert.Equal(t, "org25", apiOrgList[0].FullName)
|
||||
assert.Equal(t, "public", apiOrgList[0].Visibility)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue