]> source.dussan.org Git - gitea.git/commitdiff
Expand fixtures (#2571)
authorMorlinest <Morlinest@users.noreply.github.com>
Fri, 22 Sep 2017 10:51:16 +0000 (12:51 +0200)
committerLauris BH <lauris@nix.lv>
Fri, 22 Sep 2017 10:51:16 +0000 (13:51 +0300)
* Add more repo search tests

* Add and fix /api/repo/search integration tests

* Add owner to access table for organization repositories

* Remove tests

models/fixtures/access.yml
models/fixtures/org_user.yml
models/fixtures/repository.yml
models/fixtures/team.yml
models/fixtures/team_repo.yml
models/fixtures/team_user.yml
models/fixtures/user.yml
models/org_test.go

index 8722b248db2fb47d2e6df45833082cd6171f0f33..34d5c5c59405cfdf97426e109c84eaff32df8b38 100644 (file)
   user_id: 4
   repo_id: 3
   mode: 2 # write
+
+-
+  id: 4
+  user_id: 15
+  repo_id: 22
+  mode: 2 # write
+
+-
+  id: 5
+  user_id: 15
+  repo_id: 21
+  mode: 2 # write
+
+-
+  id: 6
+  user_id: 15
+  repo_id: 23
+  mode: 4 # owner
+
+-
+  id: 7
+  user_id: 15
+  repo_id: 24
+  mode: 4 # owner
\ No newline at end of file
index a7b8d178aa13acf28c6731e67e00e5593cb20ac0..c7fe2cf36952229e5e2902df2e17f01cf54cc133 100644 (file)
   is_public: false
   is_owner: true
   num_teams: 1
+
+-
+  id: 5
+  uid: 15
+  org_id: 17
+  is_public: true
+  is_owner: true
+  num_teams: 1
index 51812d358553b7d72058a8383564745186ed4ddf..eb83dfcff794695e1020a1350631b143467c6a6a 100644 (file)
   num_pulls: 0
   num_closed_pulls: 0
   num_watches: 0
+
+-
+  id: 17
+  owner_id: 15
+  lower_name: big_test_public_1
+  name: big_test_public_1
+  is_private: false
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  num_watches: 0
+  is_mirror: false
+
+-
+  id: 18
+  owner_id: 15
+  lower_name: big_test_public_2
+  name: big_test_public_2
+  is_private: false
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 19
+  owner_id: 15
+  lower_name: big_test_private_1
+  name: big_test_private_1
+  is_private: true
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 20
+  owner_id: 15
+  lower_name: big_test_private_2
+  name: big_test_private_2
+  is_private: true
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 21
+  owner_id: 16
+  lower_name: big_test_public_3
+  name: big_test_public_3
+  is_private: false
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 22
+  owner_id: 16
+  lower_name: big_test_private_3
+  name: big_test_private_3
+  is_private: true
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 23
+  owner_id: 17
+  lower_name: big_test_public_4
+  name: big_test_public_4
+  is_private: false
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
+
+-
+  id: 24
+  owner_id: 17
+  lower_name: big_test_private_4
+  name: big_test_private_4
+  is_private: true
+  num_issues: 0
+  num_closed_issues: 0
+  num_pulls: 0
+  num_closed_pulls: 0
+  is_mirror: false
index 795d5cda6c998e41c998f600cf8761a615f7fffe..298de648ddf782b878d695971bb0b12a87a00216 100644 (file)
   num_repos: 0
   num_members: 1
   unit_types: '[1,2,3,4,5,6,7]'
+-
+  id: 5
+  org_id: 17
+  lower_name: owners
+  name: Owners
+  authorize: 4 # owner
+  num_repos: 2
+  num_members: 1
+  unit_types: '[1,2,3,4,5,6,7]'
index 1f7385e7e9c17eb015218de04fe915d19f6010c3..5154453f7b4dd3a96865d7b8aafd90b08ed36398 100644 (file)
   org_id: 3
   team_id: 1
   repo_id: 5
+
+-
+  id: 4
+  org_id: 17
+  team_id: 5
+  repo_id: 23
+
+-
+  id: 5
+  org_id: 17
+  team_id: 5
+  repo_id: 24
\ No newline at end of file
index 955a80e4cdf03faa8f741d4b508a0794871547c8..8d9d9203782e40296d8ec48f3bcb72e889aa687f 100644 (file)
@@ -27,3 +27,9 @@
   org_id: 7
   team_id: 4
   uid: 5
+
+-
+  id: 6
+  org_id: 17
+  team_id: 5
+  uid: 15
\ No newline at end of file
index abd72b1168105b18749dd4e2cfd1f13705a0ddfc..e1fbc9e578bfe7aaac1c893a716a42e6107e079a 100644 (file)
   avatar_email: user13@example.com
   num_repos: 3
   is_active: true
+
+-
+  id: 15
+  lower_name: user15
+  name: user15
+  full_name: User 15
+  email: user15@example.com
+  passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
+  type: 0 # individual
+  salt: ZogKvWdyEx
+  is_admin: false
+  avatar: avatar15
+  avatar_email: user15@example.com
+  num_repos: 4
+  is_active: true
+
+-
+  id: 16
+  lower_name: user16
+  name: user16
+  full_name: User 16
+  email: user16@example.com
+  passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
+  type: 0 # individual
+  salt: ZogKvWdyEx
+  is_admin: false
+  avatar: avatar16
+  avatar_email: user16@example.com
+  num_repos: 2
+  is_active: true
+
+-
+  id: 17
+  lower_name: user17
+  name: user17
+  full_name: User 17
+  email: user17@example.com
+  passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
+  type: 1 # organization
+  salt: ZogKvWdyEx
+  is_admin: false
+  avatar: avatar17
+  avatar_email: user17@example.com
+  num_repos: 2
+  is_active: true
+  num_members: 1
+  num_teams: 1
\ No newline at end of file
index 07da2d56af90685a9492ee6e9cbc0867ee91692e..c7bdb8b5d3dbbd2eed266abe631375306471e79e 100644 (file)
@@ -252,7 +252,7 @@ func TestOrganizations(t *testing.T) {
                []int64{3, 6})
 
        testSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 2, PageSize: 2},
-               []int64{7})
+               []int64{7, 17})
 
        testSuccess(&SearchUserOptions{Page: 3, PageSize: 2},
                []int64{})