diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-03-28 21:42:34 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-03-28 21:42:34 +0300 |
commit | 95cda2cfb367cc0cdd770e74a8f8ddde51d344dd (patch) | |
tree | 5567daaea40996e3587f66ca90c26bc9ac4db84c | |
parent | a06f9a337ff12e3d99439faea50f697b44b79e39 (diff) | |
parent | f6aa22fc9a6eaba4accad8d069b9054b2e26fb4f (diff) |
Merge branch 'ce-reduce-diff-with-ce-in-spec-helpers' into 'master'
[CE] Reduce diff with EE in `spec/helpers`
Closes gitlab-ee#10143
See merge request gitlab-org/gitlab-ce!26706
-rw-r--r-- | spec/helpers/appearances_helper_spec.rb | 8 | ||||
-rw-r--r-- | spec/helpers/auth_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/groups_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/issuables_helper_spec.rb | 6 | ||||
-rw-r--r-- | spec/helpers/merge_requests_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 2 |
6 files changed, 15 insertions, 7 deletions
diff --git a/spec/helpers/appearances_helper_spec.rb b/spec/helpers/appearances_helper_spec.rb index 8d717b968dd..a3511e078ce 100644 --- a/spec/helpers/appearances_helper_spec.rb +++ b/spec/helpers/appearances_helper_spec.rb @@ -65,12 +65,10 @@ describe AppearancesHelper do end describe '#brand_title' do - it 'returns the default CE title when no appearance is present' do - allow(helper) - .to receive(:current_appearance) - .and_return(nil) + it 'returns the default title when no appearance is present' do + allow(helper).to receive(:current_appearance).and_return(nil) - expect(helper.brand_title).to eq('GitLab Community Edition') + expect(helper.brand_title).to eq(helper.default_brand_title) end end end diff --git a/spec/helpers/auth_helper_spec.rb b/spec/helpers/auth_helper_spec.rb index 2ba8b3dbf22..aae515def0c 100644 --- a/spec/helpers/auth_helper_spec.rb +++ b/spec/helpers/auth_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe AuthHelper do diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb index 540a8674ec2..91541a16c13 100644 --- a/spec/helpers/groups_helper_spec.rb +++ b/spec/helpers/groups_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GroupsHelper do diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index 8b82dea2524..1d1446eaa30 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe IssuablesHelper do @@ -176,7 +178,7 @@ describe IssuablesHelper do stub_commonmark_sourcepos_disabled end - it 'returns the correct json for an issue' do + it 'returns the correct data for an issue' do issue = create(:issue, author: user, description: 'issue text') @project = issue.project @@ -198,7 +200,7 @@ describe IssuablesHelper do initialDescriptionText: 'issue text', initialTaskStatus: '0 of 0 tasks completed' } - expect(helper.issuable_initial_data(issue)).to eq(expected_data) + expect(helper.issuable_initial_data(issue)).to match(hash_including(expected_data)) end end end diff --git a/spec/helpers/merge_requests_helper_spec.rb b/spec/helpers/merge_requests_helper_spec.rb index 885204062fe..193390d2f2c 100644 --- a/spec/helpers/merge_requests_helper_spec.rb +++ b/spec/helpers/merge_requests_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequestsHelper do diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 291eafece94..37c63807c82 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProjectsHelper do |