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
Kazuhiko Shiozaki
gitlab-ce
Commits
bf0c04e5
Commit
bf0c04e5
authored
Mar 12, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
7ac62388
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+0
-18
spec/helpers/groups_helper.rb
spec/helpers/groups_helper.rb
+21
-0
No files found.
spec/helpers/application_helper_spec.rb
View file @
bf0c04e5
...
@@ -39,24 +39,6 @@ describe ApplicationHelper do
...
@@ -39,24 +39,6 @@ describe ApplicationHelper do
end
end
end
end
describe
'group_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'public'
,
'gitlab_logo.png'
)
it
'should return an url for the avatar'
do
group
=
create
(
:group
)
group
.
avatar
=
File
.
open
(
avatar_file_path
)
group
.
save!
expect
(
group_icon
(
group
.
path
).
to_s
).
to
match
(
"/uploads/group/avatar/
#{
group
.
id
}
/gitlab_logo.png"
)
end
it
'should give default avatar_icon when no avatar is present'
do
group
=
create
(
:group
)
group
.
save!
expect
(
group_icon
(
group
.
path
)).
to
match
(
'group_avatar.png'
)
end
end
describe
'project_icon'
do
describe
'project_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'public'
,
'gitlab_logo.png'
)
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'public'
,
'gitlab_logo.png'
)
...
...
spec/helpers/groups_helper.rb
0 → 100644
View file @
bf0c04e5
require
'spec_helper'
describe
GroupsHelper
do
describe
'group_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'public'
,
'gitlab_logo.png'
)
it
'should return an url for the avatar'
do
group
=
create
(
:group
)
group
.
avatar
=
File
.
open
(
avatar_file_path
)
group
.
save!
expect
(
group_icon
(
group
.
path
).
to_s
).
to
match
(
"/uploads/group/avatar/
#{
group
.
id
}
/gitlab_logo.png"
)
end
it
'should give default avatar_icon when no avatar is present'
do
group
=
create
(
:group
)
group
.
save!
expect
(
group_icon
(
group
.
path
)).
to
match
(
'group_avatar.png'
)
end
end
end
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