Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-12-24 01:14:18 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-12-24 01:14:18 +0300
commit5a3b9c97e34ee69312ef9bcf575894a106c5a271 (patch)
tree50246b43588527a45dc950d53fba200e9a8f8acc /spec/helpers/page_layout_helper_spec.rb
parentb26eb782f5536d8c383aebe3d65571fb16a20bcd (diff)
Account for `@project.description` being nil
Diffstat (limited to 'spec/helpers/page_layout_helper_spec.rb')
-rw-r--r--spec/helpers/page_layout_helper_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/helpers/page_layout_helper_spec.rb b/spec/helpers/page_layout_helper_spec.rb
index a60b8f508f2..5d95beac908 100644
--- a/spec/helpers/page_layout_helper_spec.rb
+++ b/spec/helpers/page_layout_helper_spec.rb
@@ -37,6 +37,14 @@ describe PageLayoutHelper do
expect(helper.page_description_default).to eq 'Project Description'
end
+ it 'uses brand_title when Project description is nil' do
+ project = double(description: nil)
+ helper.instance_variable_set(:@project, project)
+
+ expect(helper).to receive(:brand_title).and_return('Brand Title')
+ expect(helper.page_description_default).to eq 'Brand Title'
+ end
+
it 'falls back to brand_title' do
allow(helper).to receive(:brand_title).and_return('Brand Title')