diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 18:42:58 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 20:15:06 +0100 |
commit | 5f127babcc22651754b512fbb6f3ca4559c96225 (patch) | |
tree | df56e7efe0fdd6cecf814c4fd65571ec1c1fe269 /spec/requests | |
parent | 0ccbc6515e4c08ce77af6c8a82ead52a961ce2f3 (diff) | |
download | gitlab-ce-5f127babcc22651754b512fbb6f3ca4559c96225.tar.gz |
Fix API variable specs
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/group_variables_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/variables_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/group_variables_spec.rb b/spec/requests/api/group_variables_spec.rb index a4f198eb5c9..64fa7dc824c 100644 --- a/spec/requests/api/group_variables_spec.rb +++ b/spec/requests/api/group_variables_spec.rb @@ -142,12 +142,12 @@ describe API::GroupVariables do end it 'updates variable data' do - initial_variable = group.variables.first + initial_variable = group.variables.reload.first value_before = initial_variable.value put api("/groups/#{group.id}/variables/#{variable.key}", user), value: 'VALUE_1_UP', protected: true - updated_variable = group.variables.first + updated_variable = group.variables.reload.first expect(response).to have_gitlab_http_status(200) expect(value_before).to eq(variable.value) diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb index 79ee6c126f6..62215ea3d7d 100644 --- a/spec/requests/api/variables_spec.rb +++ b/spec/requests/api/variables_spec.rb @@ -122,12 +122,12 @@ describe API::Variables do describe 'PUT /projects/:id/variables/:key' do context 'authorized user with proper permissions' do it 'updates variable data' do - initial_variable = project.variables.first + 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 - updated_variable = project.variables.first + updated_variable = project.variables.reload.first expect(response).to have_gitlab_http_status(200) expect(value_before).to eq(variable.value) |