Make sure we're loading the fresh variables

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11688#note_31186872
This commit is contained in:
Lin Jen-Shin 2017-06-01 00:37:44 +08:00
parent 65563c7b1b
commit 8a1a73a75a

View file

@ -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