Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/variables_spec.rb')
-rw-r--r--spec/requests/api/variables_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb
index be333df1d78..cdac5b2f400 100644
--- a/spec/requests/api/variables_spec.rb
+++ b/spec/requests/api/variables_spec.rb
@@ -73,7 +73,7 @@ describe API::Variables do
context 'authorized user with proper permissions' do
it 'creates variable' do
expect do
- post api("/projects/#{project.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true
+ post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true }
end.to change {project.variables.count}.by(1)
expect(response).to have_gitlab_http_status(201)
@@ -84,7 +84,7 @@ describe API::Variables do
it 'creates variable with optional attributes' do
expect do
- post api("/projects/#{project.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2'
+ post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2' }
end.to change {project.variables.count}.by(1)
expect(response).to have_gitlab_http_status(201)
@@ -95,7 +95,7 @@ describe API::Variables do
it 'does not allow to duplicate variable key' do
expect do
- post api("/projects/#{project.id}/variables", user), key: variable.key, value: 'VALUE_2'
+ post api("/projects/#{project.id}/variables", user), params: { key: variable.key, value: 'VALUE_2' }
end.to change {project.variables.count}.by(0)
expect(response).to have_gitlab_http_status(400)
@@ -125,7 +125,7 @@ describe API::Variables do
initial_variable = project.variables.reload.first
value_before = initial_variable.value
- put api("/projects/#{project.id}/variables/#{variable.key}", user), value: 'VALUE_1_UP', protected: true
+ put api("/projects/#{project.id}/variables/#{variable.key}", user), params: { value: 'VALUE_1_UP', protected: true }
updated_variable = project.variables.reload.first