Skip to content

Commit

Permalink
Fix test consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
dasv committed Dec 4, 2019
1 parent ae864a9 commit 88b278e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions integrations/api_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func TestAPISearchRepo(t *testing.T) {
expectedResults
}{
{name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{
nil: {count: 24},
user: {count: 24},
user2: {count: 24}},
nil: {count: 27},
user: {count: 27},
user2: {count: 27}},
},
{name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{
nil: {count: 10},
Expand Down
1 change: 1 addition & 0 deletions models/fixtures/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,5 +621,6 @@
num_stars: 0
num_forks: 0
num_issues: 0
num_pulls: 1
is_mirror: false
status: 0
2 changes: 1 addition & 1 deletion models/fixtures/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
is_admin: false
avatar: avatar26
avatar_email: org26@example.com
num_repos: 1
num_repos: 4
num_members: 0
num_teams: 1
repo_admin_change_team_access: true
Expand Down
6 changes: 3 additions & 3 deletions models/repo_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ func TestSearchRepository(t *testing.T) {
count: 14},
{name: "AllPublic/PublicRepositoriesOfUserIncludingCollaborative",
opts: &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 15, AllPublic: true, Template: util.OptionalBoolFalse},
count: 22},
count: 25},
{name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborative",
opts: &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 15, Private: true, AllPublic: true, Template: util.OptionalBoolFalse},
count: 28},
count: 31},
{name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborativeByName",
opts: &SearchRepoOptions{Keyword: "test", Page: 1, PageSize: 10, OwnerID: 15, Private: true, AllPublic: true},
count: 15},
Expand All @@ -187,7 +187,7 @@ func TestSearchRepository(t *testing.T) {
count: 13},
{name: "AllPublic/PublicRepositoriesOfOrganization",
opts: &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 17, AllPublic: true, Collaborate: util.OptionalBoolFalse, Template: util.OptionalBoolFalse},
count: 22},
count: 25},
{name: "AllTemplates",
opts: &SearchRepoOptions{Page: 1, PageSize: 10, Template: util.OptionalBoolTrue},
count: 2},
Expand Down

0 comments on commit 88b278e

Please sign in to comment.