summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-01 00:37:44 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-06-01 00:37:44 +0800
commit8a1a73a75a4410115b3cc5a85bf5fd85cb634182 (patch)
treebd7678f4e134533c9aef106668e6b6247e4adfd8
parent65563c7b1b64d3ab7133896ba291a3efc7afba86 (diff)
downloadgitlab-ce-8a1a73a75a4410115b3cc5a85bf5fd85cb634182.tar.gz
Make sure we're loading the fresh variables
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11688#note_31186872
-rw-r--r--spec/features/variables_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/features/variables_spec.rb b/spec/features/variables_spec.rb
index 5a5922d5f02..d0c982919db 100644
--- a/spec/features/variables_spec.rb
+++ b/spec/features/variables_spec.rb
@@ -99,7 +99,7 @@ describe 'Project variables', js: true do
click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.')
- expect(project.variables.first.value).to eq('key value')
+ expect(project.variables(true).first.value).to eq('key value')
end
it 'edits variable with empty value' do
@@ -112,7 +112,7 @@ describe 'Project variables', js: true do
click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.')
- expect(project.variables.first.value).to eq('')
+ expect(project.variables(true).first.value).to eq('')
end
it 'edits variable to be protected' do
@@ -125,7 +125,7 @@ describe 'Project variables', js: true do
click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.')
- expect(project.variables.first).to be_protected
+ expect(project.variables(true).first).to be_protected
end
it 'edits variable to be unprotected' do
@@ -140,6 +140,6 @@ describe 'Project variables', js: true do
click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.')
- expect(project.reload.variables.first).not_to be_protected
+ expect(project.variables(true).first).not_to be_protected
end
end