gitlab 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +33 -0
- data/.travis.yml +8 -3
- data/README.md +7 -7
- data/Rakefile +11 -3
- data/gitlab.gemspec +11 -11
- data/lib/gitlab.rb +2 -2
- data/lib/gitlab/api.rb +2 -1
- data/lib/gitlab/cli.rb +2 -6
- data/lib/gitlab/cli_helpers.rb +18 -20
- data/lib/gitlab/client.rb +8 -5
- data/lib/gitlab/client/branches.rb +4 -4
- data/lib/gitlab/client/build_variables.rb +64 -2
- data/lib/gitlab/client/deployments.rb +32 -0
- data/lib/gitlab/client/groups.rb +49 -0
- data/lib/gitlab/client/issues.rb +71 -0
- data/lib/gitlab/client/merge_requests.rb +1 -0
- data/lib/gitlab/client/pipeline_schedules.rb +133 -0
- data/lib/gitlab/client/pipeline_triggers.rb +2 -2
- data/lib/gitlab/client/projects.rb +1 -1
- data/lib/gitlab/client/repository_files.rb +2 -2
- data/lib/gitlab/client/users.rb +5 -5
- data/lib/gitlab/configuration.rb +2 -2
- data/lib/gitlab/error.rb +10 -2
- data/lib/gitlab/file_response.rb +1 -1
- data/lib/gitlab/help.rb +5 -6
- data/lib/gitlab/page_links.rb +2 -2
- data/lib/gitlab/request.rb +34 -50
- data/lib/gitlab/shell.rb +5 -8
- data/lib/gitlab/version.rb +1 -1
- data/spec/fixtures/deployment.json +57 -0
- data/spec/fixtures/deployments.json +116 -0
- data/spec/fixtures/group_edit.json +14 -0
- data/spec/fixtures/group_subgroups.json +16 -0
- data/spec/fixtures/pipeline_schedule.json +32 -0
- data/spec/fixtures/pipeline_schedule_create.json +21 -0
- data/spec/fixtures/pipeline_schedule_update.json +26 -0
- data/spec/fixtures/pipeline_schedule_variable.json +5 -0
- data/spec/fixtures/pipeline_schedule_variable_update.json +5 -0
- data/spec/fixtures/pipeline_schedules.json +22 -0
- data/spec/gitlab/api_spec.rb +11 -0
- data/spec/gitlab/cli_helpers_spec.rb +14 -15
- data/spec/gitlab/cli_spec.rb +11 -11
- data/spec/gitlab/client/award_emojis_spec.rb +55 -55
- data/spec/gitlab/client/boards_spec.rb +12 -12
- data/spec/gitlab/client/branches_spec.rb +22 -22
- data/spec/gitlab/client/build_variables_spec.rb +93 -10
- data/spec/gitlab/client/builds_spec.rb +36 -36
- data/spec/gitlab/client/commits_spec.rb +21 -21
- data/spec/gitlab/client/deployments_spec.rb +38 -0
- data/spec/gitlab/client/environments_spec.rb +18 -18
- data/spec/gitlab/client/groups_spec.rb +73 -22
- data/spec/gitlab/client/issues_spec.rb +121 -22
- data/spec/gitlab/client/jobs_spec.rb +13 -13
- data/spec/gitlab/client/keys_spec.rb +2 -2
- data/spec/gitlab/client/labels_spec.rb +12 -12
- data/spec/gitlab/client/merge_requests_spec.rb +23 -23
- data/spec/gitlab/client/milestones_spec.rb +12 -12
- data/spec/gitlab/client/namespaces_spec.rb +3 -3
- data/spec/gitlab/client/notes_spec.rb +40 -40
- data/spec/gitlab/client/pipeline_schedules_spec.rb +158 -0
- data/spec/gitlab/client/pipeline_triggers_spec.rb +17 -17
- data/spec/gitlab/client/pipelines_spec.rb +22 -22
- data/spec/gitlab/client/projects_spec.rb +75 -75
- data/spec/gitlab/client/repositories_spec.rb +16 -16
- data/spec/gitlab/client/repository_files_spec.rb +10 -10
- data/spec/gitlab/client/runners_spec.rb +20 -22
- data/spec/gitlab/client/services_spec.rb +6 -6
- data/spec/gitlab/client/snippets_spec.rb +12 -12
- data/spec/gitlab/client/system_hooks_spec.rb +12 -12
- data/spec/gitlab/client/tags_spec.rb +19 -20
- data/spec/gitlab/client/todos_spec.rb +12 -12
- data/spec/gitlab/client/users_spec.rb +49 -49
- data/spec/gitlab/error_spec.rb +50 -23
- data/spec/gitlab/file_response_spec.rb +6 -6
- data/spec/gitlab/help_spec.rb +5 -5
- data/spec/gitlab/objectified_hash_spec.rb +8 -8
- data/spec/gitlab/page_links_spec.rb +1 -1
- data/spec/gitlab/paginated_response_spec.rb +4 -4
- data/spec/gitlab/request_spec.rb +19 -19
- data/spec/gitlab/shell_spec.rb +12 -12
- data/spec/gitlab_spec.rb +13 -14
- data/spec/spec_helper.rb +10 -45
- metadata +46 -3
@@ -7,11 +7,11 @@ describe Gitlab::Client do
|
|
7
7
|
@merge_requests = Gitlab.merge_requests(3)
|
8
8
|
end
|
9
9
|
|
10
|
-
it "
|
10
|
+
it "gets the correct resource" do
|
11
11
|
expect(a_get("/projects/3/merge_requests")).to have_been_made
|
12
12
|
end
|
13
13
|
|
14
|
-
it "
|
14
|
+
it "returns a paginated response of project's merge requests" do
|
15
15
|
expect(@merge_requests).to be_a Gitlab::PaginatedResponse
|
16
16
|
expect(@merge_requests.first.project_id).to eq(3)
|
17
17
|
end
|
@@ -23,11 +23,11 @@ describe Gitlab::Client do
|
|
23
23
|
@merge_request = Gitlab.merge_request(3, 1)
|
24
24
|
end
|
25
25
|
|
26
|
-
it "
|
26
|
+
it "gets the correct resource" do
|
27
27
|
expect(a_get("/projects/3/merge_requests/1")).to have_been_made
|
28
28
|
end
|
29
29
|
|
30
|
-
it "
|
30
|
+
it "returns information about a merge request" do
|
31
31
|
expect(@merge_request.project_id).to eq(3)
|
32
32
|
expect(@merge_request.assignee.name).to eq("Jack Smith")
|
33
33
|
end
|
@@ -38,7 +38,7 @@ describe Gitlab::Client do
|
|
38
38
|
stub_post("/projects/3/merge_requests", "merge_request")
|
39
39
|
end
|
40
40
|
|
41
|
-
it "
|
41
|
+
it "returns information about a merge request" do
|
42
42
|
@merge_request = Gitlab.create_merge_request(3, 'New feature',
|
43
43
|
source_branch: 'api',
|
44
44
|
target_branch: 'master'
|
@@ -63,7 +63,7 @@ describe Gitlab::Client do
|
|
63
63
|
)
|
64
64
|
end
|
65
65
|
|
66
|
-
it "
|
66
|
+
it "gets the correct resource" do
|
67
67
|
expect(a_put("/projects/3/merge_requests/2").
|
68
68
|
with(body: {
|
69
69
|
assignee_id: '1',
|
@@ -72,7 +72,7 @@ describe Gitlab::Client do
|
|
72
72
|
})).to have_been_made
|
73
73
|
end
|
74
74
|
|
75
|
-
it "
|
75
|
+
it "returns information about a merge request" do
|
76
76
|
expect(@merge_request.project_id).to eq(3)
|
77
77
|
expect(@merge_request.assignee.name).to eq("Jack Smith")
|
78
78
|
end
|
@@ -85,12 +85,12 @@ describe Gitlab::Client do
|
|
85
85
|
@merge_request = Gitlab.accept_merge_request(5, 42, merge_commit_message: 'Nice!')
|
86
86
|
end
|
87
87
|
|
88
|
-
it "
|
88
|
+
it "gets the correct resource" do
|
89
89
|
expect(a_put("/projects/5/merge_requests/42/merge").
|
90
90
|
with(body: { merge_commit_message: 'Nice!' })).to have_been_made
|
91
91
|
end
|
92
92
|
|
93
|
-
it "
|
93
|
+
it "returns information about merged merge request" do
|
94
94
|
expect(@merge_request.project_id).to eq(3)
|
95
95
|
expect(@merge_request.assignee.name).to eq("Jack Smith")
|
96
96
|
end
|
@@ -102,11 +102,11 @@ describe Gitlab::Client do
|
|
102
102
|
@merge_request = Gitlab.merge_request_comments(3, 2)
|
103
103
|
end
|
104
104
|
|
105
|
-
it "
|
105
|
+
it "gets the correct resource" do
|
106
106
|
expect(a_get("/projects/3/merge_requests/2/notes")).to have_been_made
|
107
107
|
end
|
108
108
|
|
109
|
-
it "
|
109
|
+
it "returns merge request's comments" do
|
110
110
|
expect(@merge_request).to be_an Gitlab::PaginatedResponse
|
111
111
|
expect(@merge_request.length).to eq(2)
|
112
112
|
expect(@merge_request[0].note).to eq("this is the 1st comment on the 2merge merge request")
|
@@ -122,11 +122,11 @@ describe Gitlab::Client do
|
|
122
122
|
@merge_request = Gitlab.create_merge_request_comment(3, 2, 'Cool Merge Request!')
|
123
123
|
end
|
124
124
|
|
125
|
-
it "
|
125
|
+
it "gets the correct resource" do
|
126
126
|
expect(a_post("/projects/3/merge_requests/2/notes")).to have_been_made
|
127
127
|
end
|
128
128
|
|
129
|
-
it "
|
129
|
+
it "returns information about a merge request" do
|
130
130
|
expect(@merge_request.note).to eq('Cool Merge Request!')
|
131
131
|
expect(@merge_request.author.id).to eq(1)
|
132
132
|
end
|
@@ -138,11 +138,11 @@ describe Gitlab::Client do
|
|
138
138
|
@mr_changes = Gitlab.merge_request_changes(3, 2)
|
139
139
|
end
|
140
140
|
|
141
|
-
it "
|
141
|
+
it "gets the correct resource" do
|
142
142
|
expect(a_get("/projects/3/merge_requests/2/changes")).to have_been_made
|
143
143
|
end
|
144
144
|
|
145
|
-
it "
|
145
|
+
it "returns the merge request changes" do
|
146
146
|
expect(@mr_changes.changes).to be_a Array
|
147
147
|
expect(@mr_changes.changes.first['old_path']).to eq('lib/omniauth/builder.rb')
|
148
148
|
expect(@mr_changes.id).to eq(2)
|
@@ -158,11 +158,11 @@ describe Gitlab::Client do
|
|
158
158
|
@mr_commits = Gitlab.merge_request_commits(3, 2)
|
159
159
|
end
|
160
160
|
|
161
|
-
it "
|
161
|
+
it "gets the correct resource" do
|
162
162
|
expect(a_get("/projects/3/merge_requests/2/commits")).to have_been_made
|
163
163
|
end
|
164
164
|
|
165
|
-
it "
|
165
|
+
it "returns the merge request commits" do
|
166
166
|
expect(@mr_commits).to be_a Gitlab::PaginatedResponse
|
167
167
|
expect(@mr_commits.size).to eq 2
|
168
168
|
expect(@mr_commits.first.id).to eq "a2da7552f26d5b46a6a09bb8b7b066e3a102be7d"
|
@@ -181,11 +181,11 @@ describe Gitlab::Client do
|
|
181
181
|
@issues = Gitlab.merge_request_closes_issues(5, 1)
|
182
182
|
end
|
183
183
|
|
184
|
-
it "
|
184
|
+
it "gets the correct resource" do
|
185
185
|
expect(a_get("/projects/5/merge_requests/1/closes_issues")).to have_been_made
|
186
186
|
end
|
187
187
|
|
188
|
-
it "
|
188
|
+
it "returns a paginated response of the issues the merge_request will close" do
|
189
189
|
expect(@issues).to be_a(Gitlab::PaginatedResponse)
|
190
190
|
expect(@issues.first.title).to eq("Merge request 1 issue 1")
|
191
191
|
expect(@issues.size).to eq(2)
|
@@ -198,11 +198,11 @@ describe Gitlab::Client do
|
|
198
198
|
@merge_request = Gitlab.subscribe_to_merge_request(3, 2)
|
199
199
|
end
|
200
200
|
|
201
|
-
it "
|
201
|
+
it "gets the correct resource" do
|
202
202
|
expect(a_post("/projects/3/merge_requests/2/subscribe")).to have_been_made
|
203
203
|
end
|
204
204
|
|
205
|
-
it "
|
205
|
+
it "returns information about a merge request" do
|
206
206
|
expect(@merge_request.project_id).to eq(3)
|
207
207
|
end
|
208
208
|
end
|
@@ -213,11 +213,11 @@ describe Gitlab::Client do
|
|
213
213
|
@merge_request = Gitlab.unsubscribe_from_merge_request(3, 2)
|
214
214
|
end
|
215
215
|
|
216
|
-
it "
|
216
|
+
it "gets the correct resource" do
|
217
217
|
expect(a_post("/projects/3/merge_requests/2/unsubscribe")).to have_been_made
|
218
218
|
end
|
219
219
|
|
220
|
-
it "
|
220
|
+
it "returns information about a merge request" do
|
221
221
|
expect(@merge_request.project_id).to eq(3)
|
222
222
|
end
|
223
223
|
end
|
@@ -7,11 +7,11 @@ describe Gitlab::Client do
|
|
7
7
|
@milestones = Gitlab.milestones(3)
|
8
8
|
end
|
9
9
|
|
10
|
-
it "
|
10
|
+
it "gets the correct resource" do
|
11
11
|
expect(a_get("/projects/3/milestones")).to have_been_made
|
12
12
|
end
|
13
13
|
|
14
|
-
it "
|
14
|
+
it "returns a paginated response of project's milestones" do
|
15
15
|
expect(@milestones).to be_a Gitlab::PaginatedResponse
|
16
16
|
expect(@milestones.first.project_id).to eq(3)
|
17
17
|
end
|
@@ -23,11 +23,11 @@ describe Gitlab::Client do
|
|
23
23
|
@milestone = Gitlab.milestone(3, 1)
|
24
24
|
end
|
25
25
|
|
26
|
-
it "
|
26
|
+
it "gets the correct resource" do
|
27
27
|
expect(a_get("/projects/3/milestones/1")).to have_been_made
|
28
28
|
end
|
29
29
|
|
30
|
-
it "
|
30
|
+
it "returns information about a milestone" do
|
31
31
|
expect(@milestone.project_id).to eq(3)
|
32
32
|
end
|
33
33
|
end
|
@@ -38,11 +38,11 @@ describe Gitlab::Client do
|
|
38
38
|
@milestone_issues = Gitlab.milestone_issues(3, 1)
|
39
39
|
end
|
40
40
|
|
41
|
-
it "
|
41
|
+
it "gets the correct resource" do
|
42
42
|
expect(a_get("/projects/3/milestones/1/issues")).to have_been_made
|
43
43
|
end
|
44
44
|
|
45
|
-
it "
|
45
|
+
it "returns a paginated response of milestone's issues" do
|
46
46
|
expect(@milestone_issues).to be_a Gitlab::PaginatedResponse
|
47
47
|
expect(@milestone_issues.first.milestone.id).to eq(1)
|
48
48
|
end
|
@@ -54,11 +54,11 @@ describe Gitlab::Client do
|
|
54
54
|
@milestone_merge_requests = Gitlab.milestone_merge_requests(3, 1)
|
55
55
|
end
|
56
56
|
|
57
|
-
it "
|
57
|
+
it "gets the correct resource" do
|
58
58
|
expect(a_get("/projects/3/milestones/1/merge_requests")).to have_been_made
|
59
59
|
end
|
60
60
|
|
61
|
-
it "
|
61
|
+
it "returns a paginated response of milestone's merge_requests" do
|
62
62
|
expect(@milestone_merge_requests).to be_a Gitlab::PaginatedResponse
|
63
63
|
expect(@milestone_merge_requests.first.milestone.id).to eq(1)
|
64
64
|
end
|
@@ -70,12 +70,12 @@ describe Gitlab::Client do
|
|
70
70
|
@milestone = Gitlab.create_milestone(3, 'title')
|
71
71
|
end
|
72
72
|
|
73
|
-
it "
|
73
|
+
it "gets the correct resource" do
|
74
74
|
expect(a_post("/projects/3/milestones").
|
75
75
|
with(body: { title: 'title' })).to have_been_made
|
76
76
|
end
|
77
77
|
|
78
|
-
it "
|
78
|
+
it "returns information about a created milestone" do
|
79
79
|
expect(@milestone.project_id).to eq(3)
|
80
80
|
end
|
81
81
|
end
|
@@ -86,12 +86,12 @@ describe Gitlab::Client do
|
|
86
86
|
@milestone = Gitlab.edit_milestone(3, 33, title: 'title')
|
87
87
|
end
|
88
88
|
|
89
|
-
it "
|
89
|
+
it "gets the correct resource" do
|
90
90
|
expect(a_put("/projects/3/milestones/33").
|
91
91
|
with(body: { title: 'title' })).to have_been_made
|
92
92
|
end
|
93
93
|
|
94
|
-
it "
|
94
|
+
it "returns information about an edited milestone" do
|
95
95
|
expect(@milestone.project_id).to eq(3)
|
96
96
|
end
|
97
97
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Gitlab::Client do
|
4
|
-
it {
|
4
|
+
it { is_expected.to respond_to :namespaces }
|
5
5
|
|
6
6
|
describe ".namespaces" do
|
7
7
|
before do
|
@@ -9,11 +9,11 @@ describe Gitlab::Client do
|
|
9
9
|
@namespaces = Gitlab.namespaces
|
10
10
|
end
|
11
11
|
|
12
|
-
it "
|
12
|
+
it "gets the correct resource" do
|
13
13
|
expect(a_get("/namespaces")).to have_been_made
|
14
14
|
end
|
15
15
|
|
16
|
-
it "
|
16
|
+
it "returns a paginated response of namespaces" do
|
17
17
|
expect(@namespaces).to be_a Gitlab::PaginatedResponse
|
18
18
|
expect(@namespaces.first.path).to eq("john")
|
19
19
|
expect(@namespaces.first.kind).to eq("user")
|
@@ -8,11 +8,11 @@ describe Gitlab::Client do
|
|
8
8
|
@notes = Gitlab.notes(3)
|
9
9
|
end
|
10
10
|
|
11
|
-
it "
|
11
|
+
it "gets the correct resource" do
|
12
12
|
expect(a_get("/projects/3/notes")).to have_been_made
|
13
13
|
end
|
14
14
|
|
15
|
-
it "
|
15
|
+
it "returns a paginated response of notes" do
|
16
16
|
expect(@notes).to be_a Gitlab::PaginatedResponse
|
17
17
|
expect(@notes.first.author.name).to eq("John Smith")
|
18
18
|
end
|
@@ -24,11 +24,11 @@ describe Gitlab::Client do
|
|
24
24
|
@notes = Gitlab.issue_notes(3, 7)
|
25
25
|
end
|
26
26
|
|
27
|
-
it "
|
27
|
+
it "gets the correct resource" do
|
28
28
|
expect(a_get("/projects/3/issues/7/notes")).to have_been_made
|
29
29
|
end
|
30
30
|
|
31
|
-
it "
|
31
|
+
it "returns a paginated response of notes" do
|
32
32
|
expect(@notes).to be_a Gitlab::PaginatedResponse
|
33
33
|
expect(@notes.first.author.name).to eq("John Smith")
|
34
34
|
end
|
@@ -40,11 +40,11 @@ describe Gitlab::Client do
|
|
40
40
|
@notes = Gitlab.snippet_notes(3, 7)
|
41
41
|
end
|
42
42
|
|
43
|
-
it "
|
43
|
+
it "gets the correct resource" do
|
44
44
|
expect(a_get("/projects/3/snippets/7/notes")).to have_been_made
|
45
45
|
end
|
46
46
|
|
47
|
-
it "
|
47
|
+
it "returns a paginated response of notes" do
|
48
48
|
expect(@notes).to be_a Gitlab::PaginatedResponse
|
49
49
|
expect(@notes.first.author.name).to eq("John Smith")
|
50
50
|
end
|
@@ -56,11 +56,11 @@ describe Gitlab::Client do
|
|
56
56
|
@notes = Gitlab.merge_request_notes(3, 7)
|
57
57
|
end
|
58
58
|
|
59
|
-
it "
|
59
|
+
it "gets the correct resource" do
|
60
60
|
expect(a_get("/projects/3/merge_requests/7/notes")).to have_been_made
|
61
61
|
end
|
62
62
|
|
63
|
-
it "
|
63
|
+
it "returns a paginated response of notes" do
|
64
64
|
expect(@notes).to be_a Gitlab::PaginatedResponse
|
65
65
|
expect(@notes.first.author.name).to eq("John Smith")
|
66
66
|
end
|
@@ -74,11 +74,11 @@ describe Gitlab::Client do
|
|
74
74
|
@note = Gitlab.note(3, 1201)
|
75
75
|
end
|
76
76
|
|
77
|
-
it "
|
77
|
+
it "gets the correct resource" do
|
78
78
|
expect(a_get("/projects/3/notes/1201")).to have_been_made
|
79
79
|
end
|
80
80
|
|
81
|
-
it "
|
81
|
+
it "returns information about a note" do
|
82
82
|
expect(@note.body).to eq("The solution is rather tricky")
|
83
83
|
expect(@note.author.name).to eq("John Smith")
|
84
84
|
end
|
@@ -90,11 +90,11 @@ describe Gitlab::Client do
|
|
90
90
|
@note = Gitlab.issue_note(3, 7, 1201)
|
91
91
|
end
|
92
92
|
|
93
|
-
it "
|
93
|
+
it "gets the correct resource" do
|
94
94
|
expect(a_get("/projects/3/issues/7/notes/1201")).to have_been_made
|
95
95
|
end
|
96
96
|
|
97
|
-
it "
|
97
|
+
it "returns information about a note" do
|
98
98
|
expect(@note.body).to eq("The solution is rather tricky")
|
99
99
|
expect(@note.author.name).to eq("John Smith")
|
100
100
|
end
|
@@ -106,11 +106,11 @@ describe Gitlab::Client do
|
|
106
106
|
@note = Gitlab.snippet_note(3, 7, 1201)
|
107
107
|
end
|
108
108
|
|
109
|
-
it "
|
109
|
+
it "gets the correct resource" do
|
110
110
|
expect(a_get("/projects/3/snippets/7/notes/1201")).to have_been_made
|
111
111
|
end
|
112
112
|
|
113
|
-
it "
|
113
|
+
it "returns information about a note" do
|
114
114
|
expect(@note.body).to eq("The solution is rather tricky")
|
115
115
|
expect(@note.author.name).to eq("John Smith")
|
116
116
|
end
|
@@ -122,11 +122,11 @@ describe Gitlab::Client do
|
|
122
122
|
@note = Gitlab.merge_request_note(3, 7, 1201)
|
123
123
|
end
|
124
124
|
|
125
|
-
it "
|
125
|
+
it "gets the correct resource" do
|
126
126
|
expect(a_get("/projects/3/merge_requests/7/notes/1201")).to have_been_made
|
127
127
|
end
|
128
128
|
|
129
|
-
it "
|
129
|
+
it "returns information about a note" do
|
130
130
|
expect(@note.body).to eq("The solution is rather tricky")
|
131
131
|
expect(@note.author.name).to eq("John Smith")
|
132
132
|
end
|
@@ -140,12 +140,12 @@ describe Gitlab::Client do
|
|
140
140
|
@note = Gitlab.create_note(3, "The solution is rather tricky")
|
141
141
|
end
|
142
142
|
|
143
|
-
it "
|
143
|
+
it "gets the correct resource" do
|
144
144
|
expect(a_post("/projects/3/notes").
|
145
145
|
with(body: { body: 'The solution is rather tricky' })).to have_been_made
|
146
146
|
end
|
147
147
|
|
148
|
-
it "
|
148
|
+
it "returns information about a created note" do
|
149
149
|
expect(@note.body).to eq("The solution is rather tricky")
|
150
150
|
expect(@note.author.name).to eq("John Smith")
|
151
151
|
end
|
@@ -157,12 +157,12 @@ describe Gitlab::Client do
|
|
157
157
|
@note = Gitlab.create_issue_note(3, 7, "The solution is rather tricky")
|
158
158
|
end
|
159
159
|
|
160
|
-
it "
|
160
|
+
it "gets the correct resource" do
|
161
161
|
expect(a_post("/projects/3/issues/7/notes").
|
162
162
|
with(body: { body: 'The solution is rather tricky' })).to have_been_made
|
163
163
|
end
|
164
164
|
|
165
|
-
it "
|
165
|
+
it "returns information about a created note" do
|
166
166
|
expect(@note.body).to eq("The solution is rather tricky")
|
167
167
|
expect(@note.author.name).to eq("John Smith")
|
168
168
|
end
|
@@ -174,12 +174,12 @@ describe Gitlab::Client do
|
|
174
174
|
@note = Gitlab.create_snippet_note(3, 7, "The solution is rather tricky")
|
175
175
|
end
|
176
176
|
|
177
|
-
it "
|
177
|
+
it "gets the correct resource" do
|
178
178
|
expect(a_post("/projects/3/snippets/7/notes").
|
179
179
|
with(body: { body: 'The solution is rather tricky' })).to have_been_made
|
180
180
|
end
|
181
181
|
|
182
|
-
it "
|
182
|
+
it "returns information about a created note" do
|
183
183
|
expect(@note.body).to eq("The solution is rather tricky")
|
184
184
|
expect(@note.author.name).to eq("John Smith")
|
185
185
|
end
|
@@ -191,12 +191,12 @@ describe Gitlab::Client do
|
|
191
191
|
@note = Gitlab.create_merge_request_note(3, 7, "The solution is rather tricky")
|
192
192
|
end
|
193
193
|
|
194
|
-
it "
|
194
|
+
it "gets the correct resource" do
|
195
195
|
expect(a_post("/projects/3/merge_requests/7/notes").
|
196
196
|
with(body: { body: 'The solution is rather tricky' })).to have_been_made
|
197
197
|
end
|
198
198
|
|
199
|
-
it "
|
199
|
+
it "returns information about a created note" do
|
200
200
|
expect(@note.body).to eq("The solution is rather tricky")
|
201
201
|
expect(@note.author.name).to eq("John Smith")
|
202
202
|
end
|
@@ -210,11 +210,11 @@ describe Gitlab::Client do
|
|
210
210
|
@note = Gitlab.delete_note(3, 1201)
|
211
211
|
end
|
212
212
|
|
213
|
-
it "
|
213
|
+
it "gets the correct resource" do
|
214
214
|
expect(a_delete("/projects/3/notes/1201")).to have_been_made
|
215
215
|
end
|
216
216
|
|
217
|
-
it "
|
217
|
+
it "returns information about a deleted note" do
|
218
218
|
expect(@note.id).to eq(1201)
|
219
219
|
end
|
220
220
|
end
|
@@ -225,11 +225,11 @@ describe Gitlab::Client do
|
|
225
225
|
@note = Gitlab.delete_issue_note(3, 7, 1201)
|
226
226
|
end
|
227
227
|
|
228
|
-
it "
|
228
|
+
it "gets the correct resource" do
|
229
229
|
expect(a_delete("/projects/3/issues/7/notes/1201")).to have_been_made
|
230
230
|
end
|
231
231
|
|
232
|
-
it "
|
232
|
+
it "returns information about a deleted issue note" do
|
233
233
|
expect(@note.id).to eq(1201)
|
234
234
|
end
|
235
235
|
end
|
@@ -240,11 +240,11 @@ describe Gitlab::Client do
|
|
240
240
|
@note = Gitlab.delete_snippet_note(3, 7, 1201)
|
241
241
|
end
|
242
242
|
|
243
|
-
it "
|
243
|
+
it "gets the correct resource" do
|
244
244
|
expect(a_delete("/projects/3/snippets/7/notes/1201")).to have_been_made
|
245
245
|
end
|
246
246
|
|
247
|
-
it "
|
247
|
+
it "returns information about a deleted snippet note" do
|
248
248
|
expect(@note.id).to eq(1201)
|
249
249
|
end
|
250
250
|
end
|
@@ -255,11 +255,11 @@ describe Gitlab::Client do
|
|
255
255
|
@note = Gitlab.delete_merge_request_note(3, 7, 1201)
|
256
256
|
end
|
257
257
|
|
258
|
-
it "
|
258
|
+
it "gets the correct resource" do
|
259
259
|
expect(a_delete("/projects/3/merge_requests/7/notes/1201")).to have_been_made
|
260
260
|
end
|
261
261
|
|
262
|
-
it "
|
262
|
+
it "returns information about a deleted merge request note" do
|
263
263
|
expect(@note.id).to eq(1201)
|
264
264
|
end
|
265
265
|
end
|
@@ -272,12 +272,12 @@ describe Gitlab::Client do
|
|
272
272
|
@note = Gitlab.edit_note(3, 1201, body: "edited wall note content")
|
273
273
|
end
|
274
274
|
|
275
|
-
it "
|
275
|
+
it "gets the correct resource" do
|
276
276
|
expect(a_put("/projects/3/notes/1201").
|
277
277
|
with(body: {body: 'edited wall note content'})).to have_been_made
|
278
278
|
end
|
279
279
|
|
280
|
-
it "
|
280
|
+
it "returns information about a modified note" do
|
281
281
|
expect(@note.id).to eq(1201)
|
282
282
|
end
|
283
283
|
end
|
@@ -288,12 +288,12 @@ describe Gitlab::Client do
|
|
288
288
|
@note = Gitlab.edit_issue_note(3, 7, 1201, body: "edited issue note content")
|
289
289
|
end
|
290
290
|
|
291
|
-
it "
|
291
|
+
it "gets the correct resource" do
|
292
292
|
expect(a_put("/projects/3/issues/7/notes/1201").
|
293
293
|
with(body: {body: 'edited issue note content'})).to have_been_made
|
294
294
|
end
|
295
295
|
|
296
|
-
it "
|
296
|
+
it "returns information about a modified issue note" do
|
297
297
|
expect(@note.id).to eq(1201)
|
298
298
|
end
|
299
299
|
end
|
@@ -304,12 +304,12 @@ describe Gitlab::Client do
|
|
304
304
|
@note = Gitlab.edit_snippet_note(3, 7, 1201, body: "edited snippet note content")
|
305
305
|
end
|
306
306
|
|
307
|
-
it "
|
307
|
+
it "gets the correct resource" do
|
308
308
|
expect(a_put("/projects/3/snippets/7/notes/1201").
|
309
309
|
with(body: {body: 'edited snippet note content'})).to have_been_made
|
310
310
|
end
|
311
311
|
|
312
|
-
it "
|
312
|
+
it "returns information about a modified snippet note" do
|
313
313
|
expect(@note.id).to eq(1201)
|
314
314
|
end
|
315
315
|
end
|
@@ -320,12 +320,12 @@ describe Gitlab::Client do
|
|
320
320
|
@note = Gitlab.edit_merge_request_note(3, 7, 1201, body: "edited merge request note content")
|
321
321
|
end
|
322
322
|
|
323
|
-
it "
|
323
|
+
it "gets the correct resource" do
|
324
324
|
expect(a_put("/projects/3/merge_requests/7/notes/1201").
|
325
325
|
with(body: {body: 'edited merge request note content'})).to have_been_made
|
326
326
|
end
|
327
327
|
|
328
|
-
it "
|
328
|
+
it "returns information about a modified request note" do
|
329
329
|
expect(@note.id).to eq(1201)
|
330
330
|
end
|
331
331
|
end
|