BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5a3b9c97
Commit
5a3b9c97
authored
Dec 23, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account for `@project.description` being nil
parent
b26eb782
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
page_layout_helper.rb
app/helpers/page_layout_helper.rb
+1
-1
page_layout_helper_spec.rb
spec/helpers/page_layout_helper_spec.rb
+8
-0
No files found.
app/helpers/page_layout_helper.rb
View file @
5a3b9c97
...
...
@@ -40,7 +40,7 @@ module PageLayoutHelper
# a view
def
page_description_default
if
@project
@project
.
description
@project
.
description
||
brand_title
else
brand_title
end
...
...
spec/helpers/page_layout_helper_spec.rb
View file @
5a3b9c97
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment