summaryrefslogtreecommitdiff
path: root/spec/requests/api/internal
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 15:08:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 15:08:33 +0000
commit511e761b41b81484c85e3d125f45873ce38e9201 (patch)
tree6bb98a6356de6e1d736951d2eef6ec83e6aa3dd2 /spec/requests/api/internal
parent4247e67be1faa9d52691757dad954a7fa63e8bfe (diff)
downloadgitlab-ce-511e761b41b81484c85e3d125f45873ce38e9201.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/internal')
-rw-r--r--spec/requests/api/internal/base_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb
index 4fe0d4a5983..12e6e7c7a09 100644
--- a/spec/requests/api/internal/base_spec.rb
+++ b/spec/requests/api/internal/base_spec.rb
@@ -389,6 +389,12 @@ describe API::Internal::Base do
end
end
end
+
+ it_behaves_like 'storing arguments in the application context' do
+ let(:expected_params) { { user: key.user.username, project: project.full_path } }
+
+ subject { push(key, project) }
+ end
end
context "access denied" do
@@ -885,6 +891,12 @@ describe API::Internal::Base do
post api('/internal/post_receive'), params: valid_params
end
+ it_behaves_like 'storing arguments in the application context' do
+ let(:expected_params) { { user: user.username, project: project.full_path } }
+
+ subject { post api('/internal/post_receive'), params: valid_params }
+ end
+
context 'when there are merge_request push options' do
before do
valid_params[:push_options] = ['merge_request.create']