diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-12-14 19:06:10 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-12-14 19:06:10 +0300 |
commit | 0a69dbd23da6f625adfc09d7c98fdd1cafe39f4e (patch) | |
tree | 64ff958eb12efaf8a2185344b1be0ef844bea025 /spec/features | |
parent | 9f8e64e6abd0297c6f8cf2aaea10c57bbbffde5c (diff) | |
parent | 3c2a6be04d36c783b128bdc5fc6d53b948f3884c (diff) |
Merge branch 'fix-warnings' into 'master'
Fix warnings in tests
See merge request gitlab-org/gitlab-ce!23788
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues/user_creates_issue_spec.rb | 10 | ||||
-rw-r--r-- | spec/features/projects/labels/user_views_labels_spec.rb | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb index 687a6f1eafc..830d56035aa 100644 --- a/spec/features/issues/user_creates_issue_spec.rb +++ b/spec/features/issues/user_creates_issue_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe "User creates issue" do @@ -64,10 +66,10 @@ describe "User creates issue" do end context "with labels" do - LABEL_TITLES = %w(bug feature enhancement).freeze + let(:label_titles) { %w(bug feature enhancement) } before do - LABEL_TITLES.each do |title| + label_titles.each do |title| create(:label, project: project, title: title) end end @@ -77,13 +79,13 @@ describe "User creates issue" do fill_in("Title", with: issue_title) click_button("Label") - click_link(LABEL_TITLES.first) + click_link(label_titles.first) click_button("Submit issue") expect(page).to have_content(issue_title) .and have_content(user.name) .and have_content(project.name) - .and have_content(LABEL_TITLES.first) + .and have_content(label_titles.first) end end end diff --git a/spec/features/projects/labels/user_views_labels_spec.rb b/spec/features/projects/labels/user_views_labels_spec.rb index 0cbeca4e392..2c8267764bd 100644 --- a/spec/features/projects/labels/user_views_labels_spec.rb +++ b/spec/features/projects/labels/user_views_labels_spec.rb @@ -1,13 +1,15 @@ +# frozen_string_literal: true + require "spec_helper" describe "User views labels" do set(:project) { create(:project_empty_repo, :public) } set(:user) { create(:user) } - LABEL_TITLES = %w[bug enhancement feature].freeze + let(:label_titles) { %w[bug enhancement feature] } before do - LABEL_TITLES.each { |title| create(:label, project: project, title: title) } + label_titles.each { |title| create(:label, project: project, title: title) } project.add_guest(user) sign_in(user) @@ -17,7 +19,7 @@ describe "User views labels" do it "shows all labels" do page.within('.other-labels .manage-labels-list') do - LABEL_TITLES.each { |title| expect(page).to have_content(title) } + label_titles.each { |title| expect(page).to have_content(title) } end end end |