Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
a7756a4b
Commit
a7756a4b
authored
Dec 27, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for page_image using a Group's avatar
parent
bd21e3d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/helpers/page_layout_helper_spec.rb
spec/helpers/page_layout_helper_spec.rb
+16
-0
No files found.
spec/helpers/page_layout_helper_spec.rb
View file @
a7756a4b
...
...
@@ -96,6 +96,22 @@ describe PageLayoutHelper do
helper
.
page_image
end
end
context
'with @group'
do
it
'uses Group avatar if available'
do
group
=
double
(
avatar_url:
'http://example.com/uploads/avatar.png'
)
helper
.
instance_variable_set
(
:@group
,
group
)
expect
(
helper
.
page_image
).
to
eq
group
.
avatar_url
end
it
'falls back to the default'
do
group
=
double
(
avatar_url:
nil
)
helper
.
instance_variable_set
(
:@group
,
group
)
expect
(
helper
.
page_image
).
to
end_with
'assets/gitlab_logo.png'
end
end
end
describe
'page_card_attributes'
do
...
...
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