Commit 8a1a73a7 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make sure we're loading the fresh variables

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11688#note_31186872
parent 65563c7b
...@@ -99,7 +99,7 @@ describe 'Project variables', js: true do ...@@ -99,7 +99,7 @@ describe 'Project variables', js: true do
click_button('Save variable') click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.') 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 end
it 'edits variable with empty value' do it 'edits variable with empty value' do
...@@ -112,7 +112,7 @@ describe 'Project variables', js: true do ...@@ -112,7 +112,7 @@ describe 'Project variables', js: true do
click_button('Save variable') click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.') 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 end
it 'edits variable to be protected' do it 'edits variable to be protected' do
...@@ -125,7 +125,7 @@ describe 'Project variables', js: true do ...@@ -125,7 +125,7 @@ describe 'Project variables', js: true do
click_button('Save variable') click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.') 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 end
it 'edits variable to be unprotected' do it 'edits variable to be unprotected' do
...@@ -140,6 +140,6 @@ describe 'Project variables', js: true do ...@@ -140,6 +140,6 @@ describe 'Project variables', js: true do
click_button('Save variable') click_button('Save variable')
expect(page).to have_content('Variable was successfully updated.') 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
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment