summaryrefslogtreecommitdiff
path: root/spec/requests/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 15:09:15 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 15:09:15 +0000
commit536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (patch)
tree88d08f7dfa29a32d6526773c4fe0fefd9f2bc7d1 /spec/requests/api
parent50ae4065530c4eafbeb7c5ff2c462c48c02947ca (diff)
downloadgitlab-ce-536aa3a1f4b96abc4ca34489bf2cbe503afcded7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r--spec/requests/api/issues/post_projects_issues_spec.rb2
-rw-r--r--spec/requests/api/issues/put_projects_issues_spec.rb2
-rw-r--r--spec/requests/api/merge_requests_spec.rb6
-rw-r--r--spec/requests/api/project_snippets_spec.rb4
-rw-r--r--spec/requests/api/snippets_spec.rb4
5 files changed, 12 insertions, 6 deletions
diff --git a/spec/requests/api/issues/post_projects_issues_spec.rb b/spec/requests/api/issues/post_projects_issues_spec.rb
index 6597a3ab3ba..341d0e8ae6b 100644
--- a/spec/requests/api/issues/post_projects_issues_spec.rb
+++ b/spec/requests/api/issues/post_projects_issues_spec.rb
@@ -392,7 +392,7 @@ describe API::Issues do
expect_next_instance_of(Spam::SpamCheckService) do |spam_service|
expect(spam_service).to receive_messages(check_for_spam?: true)
end
- expect_next_instance_of(AkismetService) do |akismet_service|
+ expect_next_instance_of(Spam::AkismetService) do |akismet_service|
expect(akismet_service).to receive_messages(spam?: true)
end
end
diff --git a/spec/requests/api/issues/put_projects_issues_spec.rb b/spec/requests/api/issues/put_projects_issues_spec.rb
index e6fec2fa1fc..8e78aca59b2 100644
--- a/spec/requests/api/issues/put_projects_issues_spec.rb
+++ b/spec/requests/api/issues/put_projects_issues_spec.rb
@@ -197,7 +197,7 @@ describe API::Issues do
expect_next_instance_of(Spam::SpamCheckService) do |spam_service|
expect(spam_service).to receive_messages(check_for_spam?: true)
end
- expect_next_instance_of(AkismetService) do |akismet_service|
+ expect_next_instance_of(Spam::AkismetService) do |akismet_service|
expect(akismet_service).to receive_messages(spam?: true)
end
end
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb
index 58ae4565582..33ac175e945 100644
--- a/spec/requests/api/merge_requests_spec.rb
+++ b/spec/requests/api/merge_requests_spec.rb
@@ -1069,10 +1069,16 @@ describe API::MergeRequests do
describe 'GET /projects/:id/merge_requests/:merge_request_iid/:context_commits' do
it 'returns a 200 when merge request is valid' do
+ context_commit = merge_request.context_commits.first
+
get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/context_commits", user)
+
expect(response).to have_gitlab_http_status(200)
+ expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response.size).to eq(merge_request.context_commits.size)
+ expect(json_response.first['id']).to eq(context_commit.id)
+ expect(json_response.first['title']).to eq(context_commit.title)
end
it 'returns a 404 when merge_request_iid not found' do
diff --git a/spec/requests/api/project_snippets_spec.rb b/spec/requests/api/project_snippets_spec.rb
index bfb6f10efa3..ccbfe040fca 100644
--- a/spec/requests/api/project_snippets_spec.rb
+++ b/spec/requests/api/project_snippets_spec.rb
@@ -179,7 +179,7 @@ describe API::ProjectSnippets do
end
before do
- allow_next_instance_of(AkismetService) do |instance|
+ allow_next_instance_of(Spam::AkismetService) do |instance|
allow(instance).to receive(:spam?).and_return(true)
end
end
@@ -271,7 +271,7 @@ describe API::ProjectSnippets do
end
before do
- allow_next_instance_of(AkismetService) do |instance|
+ allow_next_instance_of(Spam::AkismetService) do |instance|
allow(instance).to receive(:spam?).and_return(true)
end
end
diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb
index f32be7a8765..1749ec89bc1 100644
--- a/spec/requests/api/snippets_spec.rb
+++ b/spec/requests/api/snippets_spec.rb
@@ -238,7 +238,7 @@ describe API::Snippets do
end
before do
- allow_next_instance_of(AkismetService) do |instance|
+ allow_next_instance_of(Spam::AkismetService) do |instance|
allow(instance).to receive(:spam?).and_return(true)
end
end
@@ -327,7 +327,7 @@ describe API::Snippets do
end
before do
- allow_next_instance_of(AkismetService) do |instance|
+ allow_next_instance_of(Spam::AkismetService) do |instance|
allow(instance).to receive(:spam?).and_return(true)
end
end