diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-07-03 21:53:29 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-06 16:34:20 +0900 |
commit | f5be4ed9f0c59cb9c406a60fa8775655e4ccb004 (patch) | |
tree | 4d28500beaeabb6444b503144610e30dcf3e1705 | |
parent | 81e5f4f3a2f9d72e28356d5458c345348e8e6aaa (diff) | |
download | gitlab-ce-f5be4ed9f0c59cb9c406a60fa8775655e4ccb004.tar.gz |
godffat spec nitpicks
-rw-r--r-- | spec/features/group_variables_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/variables_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/ci/build_spec.rb | 4 | ||||
-rw-r--r-- | spec/presenters/ci/group_variable_presenter_spec.rb | 2 | ||||
-rw-r--r-- | spec/presenters/ci/variable_presenter_spec.rb | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/features/group_variables_spec.rb b/spec/features/group_variables_spec.rb index fe2e03cb670..37814ba6238 100644 --- a/spec/features/group_variables_spec.rb +++ b/spec/features/group_variables_spec.rb @@ -39,7 +39,7 @@ feature 'Group variables', js: true do visit group_settings_ci_cd_path(group) page.within('.variable-menu') do - find(".btn-variable-edit").click + click_on 'Update' end fill_in 'variable_key', with: 'BBB' @@ -66,7 +66,7 @@ feature 'Group variables', js: true do page.within('.variable-menu') do page.accept_alert 'Are you sure?' do - find(".btn-variable-delete").click + click_on 'Remove' end end end diff --git a/spec/features/variables_spec.rb b/spec/features/variables_spec.rb index 1a2dedf27eb..a7c24c7d718 100644 --- a/spec/features/variables_spec.rb +++ b/spec/features/variables_spec.rb @@ -82,7 +82,7 @@ describe 'Project variables', js: true do it 'deletes variable' do page.within('.variables-table') do - find('.btn-variable-delete').click + click_on 'Remove' end expect(page).not_to have_selector('variables-table') @@ -90,7 +90,7 @@ describe 'Project variables', js: true do it 'edits variable' do page.within('.variables-table') do - find('.btn-variable-edit').click + click_on 'Update' end expect(page).to have_content('Update variable') @@ -104,7 +104,7 @@ describe 'Project variables', js: true do it 'edits variable with empty value' do page.within('.variables-table') do - find('.btn-variable-edit').click + click_on 'Update' end expect(page).to have_content('Update variable') @@ -117,7 +117,7 @@ describe 'Project variables', js: true do it 'edits variable to be protected' do page.within('.variables-table') do - find('.btn-variable-edit').click + click_on 'Update' end expect(page).to have_content('Update variable') @@ -132,7 +132,7 @@ describe 'Project variables', js: true do project.variables.first.update(protected: true) page.within('.variables-table') do - find('.btn-variable-edit').click + click_on 'Update' end expect(page).to have_content('Update variable') diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index c4af7f3638f..ef9027463b8 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1363,7 +1363,7 @@ describe Ci::Build, :models do let(:group) { create(:group, :access_requestable) } before do - allow(build.project).to receive(:group).and_return(group) + build.project.update(group: group) create(:ci_group_variable, secret_variable.slice(:key, :value).merge(group: group)) @@ -1380,7 +1380,7 @@ describe Ci::Build, :models do let(:group) { create(:group, :access_requestable) } before do - allow(build.project).to receive(:group).and_return(group) + build.project.update(group: group) create(:ci_group_variable, :protected, diff --git a/spec/presenters/ci/group_variable_presenter_spec.rb b/spec/presenters/ci/group_variable_presenter_spec.rb index 1b5dade3ca0..ed34edaf18f 100644 --- a/spec/presenters/ci/group_variable_presenter_spec.rb +++ b/spec/presenters/ci/group_variable_presenter_spec.rb @@ -21,7 +21,7 @@ describe Ci::GroupVariablePresenter do expect(presenter.variable).to eq(variable) end - it 'forwards missing methods to pipeline' do + it 'forwards missing methods to variable' do expect(presenter.key).to eq(variable.key) end end diff --git a/spec/presenters/ci/variable_presenter_spec.rb b/spec/presenters/ci/variable_presenter_spec.rb index ff4ad215d04..efabd74d678 100644 --- a/spec/presenters/ci/variable_presenter_spec.rb +++ b/spec/presenters/ci/variable_presenter_spec.rb @@ -21,7 +21,7 @@ describe Ci::VariablePresenter do expect(presenter.variable).to eq(variable) end - it 'forwards missing methods to pipeline' do + it 'forwards missing methods to variable' do expect(presenter.key).to eq(variable.key) end end |