Skip to content

Commit d6530c3

Browse files
committed
add tests ( not finished )
1 parent 159d3e1 commit d6530c3

File tree

12 files changed

+461
-7
lines changed

12 files changed

+461
-7
lines changed

models/fixtures/issue.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,3 +372,71 @@
372372
created_unix: 1707270422
373373
updated_unix: 1707270422
374374
is_locked: false
375+
376+
-
377+
id: 23
378+
repo_id: 1
379+
index: 6
380+
poster_id: 2
381+
original_author_id: 0
382+
name: repo1 issue6
383+
content: content for repo1 issue6
384+
milestone_id: 0
385+
priority: 0
386+
is_closed: false
387+
is_pull: false
388+
num_comments: 0
389+
created_unix: 1707270422
390+
updated_unix: 1707270422
391+
is_locked: false
392+
393+
-
394+
id: 24
395+
repo_id: 23
396+
index: 2
397+
poster_id: 2
398+
original_author_id: 0
399+
name: repo1 issue6
400+
content: content for repo1 issue6
401+
milestone_id: 0
402+
priority: 0
403+
is_closed: false
404+
is_pull: false
405+
num_comments: 0
406+
created_unix: 1707270422
407+
updated_unix: 1707270422
408+
is_locked: false
409+
410+
-
411+
id: 25
412+
repo_id: 41
413+
index: 1
414+
poster_id: 2
415+
original_author_id: 0
416+
name: repo41 issue1
417+
content: content for repo41 issue1
418+
milestone_id: 0
419+
priority: 0
420+
is_closed: false
421+
is_pull: false
422+
num_comments: 0
423+
created_unix: 1707270422
424+
updated_unix: 1707270422
425+
is_locked: false
426+
427+
-
428+
id: 26
429+
repo_id: 41
430+
index: 2
431+
poster_id: 2
432+
original_author_id: 0
433+
name: repo41 issue2
434+
content: content for repo41 issue2
435+
milestone_id: 0
436+
priority: 0
437+
is_closed: false
438+
is_pull: false
439+
num_comments: 0
440+
created_unix: 1707270422
441+
updated_unix: 1707270422
442+
is_locked: false

models/fixtures/project.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,51 @@
4545
type: 2
4646
created_unix: 1688973000
4747
updated_unix: 1688973000
48+
49+
-
50+
id: 5
51+
title: project on repo23
52+
owner_id: 0
53+
repo_id: 23
54+
is_closed: false
55+
creator_id: 15
56+
board_type: 1
57+
type: 2
58+
created_unix: 1688973000
59+
updated_unix: 1688973000
60+
61+
-
62+
id: 6
63+
title: project on org17
64+
owner_id: 17
65+
repo_id: 0
66+
is_closed: false
67+
creator_id: 15
68+
board_type: 1
69+
type: 2
70+
created_unix: 1688973000
71+
updated_unix: 1688973000
72+
73+
-
74+
id: 7
75+
title: project on private_repo_on_private_org
76+
owner_id: 0
77+
repo_id: 41
78+
is_closed: false
79+
creator_id: 2
80+
board_type: 1
81+
type: 2
82+
created_unix: 1688973000
83+
updated_unix: 1688973000
84+
85+
-
86+
id: 8
87+
title: project on privated_org
88+
owner_id: 23
89+
repo_id: 0
90+
is_closed: false
91+
creator_id: 2
92+
board_type: 1
93+
type: 2
94+
created_unix: 1688973000
95+
updated_unix: 1688973000

models/fixtures/project_board.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,35 @@
2929
creator_id: 2
3030
created_unix: 1588117528
3131
updated_unix: 1588117528
32+
33+
-
34+
id: 5
35+
project_id: 5
36+
title: Done
37+
creator_id: 15
38+
created_unix: 1588117528
39+
updated_unix: 1588117528
40+
41+
-
42+
id: 6
43+
project_id: 6
44+
title: Done
45+
creator_id: 15
46+
created_unix: 1588117528
47+
updated_unix: 1588117528
48+
49+
-
50+
id: 7
51+
project_id: 7
52+
title: Done
53+
creator_id: 2
54+
created_unix: 1588117528
55+
updated_unix: 1588117528
56+
57+
-
58+
id: 8
59+
project_id: 8
60+
title: Done
61+
creator_id: 2
62+
created_unix: 1588117528
63+
updated_unix: 1588117528

models/fixtures/project_issue.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,33 @@
2121
issue_id: 5
2222
project_id: 1
2323
project_board_id: 3
24+
25+
-
26+
id: 5
27+
issue_id: 23
28+
project_id: 4
29+
project_board_id: 4
30+
31+
-
32+
id: 6
33+
issue_id: 20
34+
project_id: 5
35+
project_board_id: 5
36+
37+
-
38+
id: 7
39+
issue_id: 24
40+
project_id: 6
41+
project_board_id: 6
42+
43+
-
44+
id: 8
45+
issue_id: 25
46+
project_id: 7
47+
project_board_id: 7
48+
49+
-
50+
id: 9
51+
issue_id: 26
52+
project_id: 8
53+
project_board_id: 8

models/fixtures/repository.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,13 +677,13 @@
677677
num_watches: 0
678678
num_stars: 0
679679
num_forks: 0
680-
num_issues: 0
680+
num_issues: 1
681681
num_closed_issues: 0
682682
num_pulls: 1
683683
num_closed_pulls: 0
684684
num_milestones: 0
685685
num_closed_milestones: 0
686-
num_projects: 0
686+
num_projects: 1
687687
num_closed_projects: 0
688688
is_private: false
689689
is_empty: true
@@ -1225,13 +1225,13 @@
12251225
num_watches: 0
12261226
num_stars: 0
12271227
num_forks: 0
1228-
num_issues: 0
1228+
num_issues: 2
12291229
num_closed_issues: 0
12301230
num_pulls: 0
12311231
num_closed_pulls: 0
12321232
num_milestones: 0
12331233
num_closed_milestones: 0
1234-
num_projects: 0
1234+
num_projects: 1
12351235
num_closed_projects: 0
12361236
is_private: true
12371237
is_empty: false

models/fixtures/team.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
lower_name: test_team
8282
name: test_team
8383
authorize: 2 # write
84-
num_repos: 1
84+
num_repos: 2
8585
num_members: 1
8686
includes_all_repositories: false
8787
can_create_org_repo: false
@@ -170,7 +170,7 @@
170170
name: Owners
171171
authorize: 4 # owner
172172
num_repos: 0
173-
num_members: 0
173+
num_members: 1
174174
includes_all_repositories: false
175175
can_create_org_repo: true
176176

@@ -239,3 +239,14 @@
239239
num_members: 2
240240
includes_all_repositories: false
241241
can_create_org_repo: false
242+
243+
-
244+
id: 23
245+
org_id: 23
246+
lower_name: teamwithnoissueaccess
247+
name: teamwithnoissueaccess
248+
authorize: 0 # write
249+
num_repos: 1
250+
num_members: 1
251+
includes_all_repositories: false
252+
can_create_org_repo: false

models/fixtures/team_repo.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,15 @@
7575
org_id: 41
7676
team_id: 22
7777
repo_id: 61
78+
79+
-
80+
id: 14
81+
org_id: 23
82+
team_id: 16
83+
repo_id: 41
84+
85+
-
86+
id: 15
87+
org_id: 23
88+
team_id: 23
89+
repo_id: 41

models/fixtures/team_unit.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,21 @@
322322
team_id: 22
323323
type: 3
324324
access_mode: 1
325+
326+
-
327+
id: 55
328+
team_id: 16
329+
type: 2 # issue
330+
access_mode: 4
331+
332+
-
333+
id: 56
334+
team_id: 17
335+
type: 2 # issue
336+
access_mode: 2
337+
338+
-
339+
id: 57
340+
team_id: 23
341+
type: 2 # issue
342+
access_mode: 0

models/fixtures/team_user.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,15 @@
147147
org_id: 41
148148
team_id: 22
149149
uid: 39
150+
151+
-
152+
id: 26
153+
org_id: 23
154+
team_id: 16
155+
uid: 2
156+
157+
-
158+
id: 27
159+
org_id: 23
160+
team_id: 23
161+
uid: 4

0 commit comments

Comments
 (0)