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
Jérome Perrin
gitlab-ce
Commits
fe942545
Commit
fe942545
authored
Jun 22, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix avatar tests to use banana_sample.gif since SVG is not supported
parent
bcb07929
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
README.md
README.md
+2
-2
features/steps/groups.rb
features/steps/groups.rb
+3
-3
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+3
-3
features/steps/project/project.rb
features/steps/project/project.rb
+3
-3
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+6
-6
spec/helpers/groups_helper.rb
spec/helpers/groups_helper.rb
+2
-2
No files found.
README.md
View file @
fe942545
...
...
@@ -2,7 +2,7 @@
The source of GitLab Community Edition is
[
hosted on GitLab.com
](
https://gitlab.com/gitlab-org/gitlab-ce/
)
and there are mirrors to make
[
contributing
](
CONTRIBUTING.md
)
as easy as possible.
# ![logo](https://about.gitlab.com/images/
gitlab_logo.pn
g) GitLab
# ![logo](https://about.gitlab.com/images/
logo.sv
g) GitLab
## Open source software to collaborate on code
...
...
features/steps/groups.rb
View file @
fe942545
...
...
@@ -128,14 +128,14 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
step
'I change group "Owned" avatar'
do
attach_file
(
:group_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
))
attach_file
(
:group_avatar
,
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
))
click_button
"Save group"
Group
.
find_by
(
name:
"Owned"
).
reload
end
step
'I should see new group "Owned" avatar'
do
expect
(
Group
.
find_by
(
name:
"Owned"
).
avatar
).
to
be_instance_of
AvatarUploader
expect
(
Group
.
find_by
(
name:
"Owned"
).
avatar
.
url
).
to
eq
"/uploads/group/avatar/
#{
Group
.
find_by
(
name
:"Owned"
).
id
}
/
gitlab_logo.png
"
expect
(
Group
.
find_by
(
name:
"Owned"
).
avatar
.
url
).
to
eq
"/uploads/group/avatar/
#{
Group
.
find_by
(
name
:"Owned"
).
id
}
/
banana_sample.gif
"
end
step
'I should see the "Remove avatar" button'
do
...
...
@@ -143,7 +143,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
step
'I have group "Owned" avatar'
do
attach_file
(
:group_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
))
attach_file
(
:group_avatar
,
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
))
click_button
"Save group"
Group
.
find_by
(
name:
"Owned"
).
reload
end
...
...
features/steps/profile/profile.rb
View file @
fe942545
...
...
@@ -27,14 +27,14 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
step
'I change my avatar'
do
attach_file
(
:user_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
))
attach_file
(
:user_avatar
,
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
))
click_button
"Save changes"
@user
.
reload
end
step
'I should see new avatar'
do
expect
(
@user
.
avatar
).
to
be_instance_of
AvatarUploader
expect
(
@user
.
avatar
.
url
).
to
eq
"/uploads/user/avatar/
#{
@user
.
id
}
/
gitlab_logo.png
"
expect
(
@user
.
avatar
.
url
).
to
eq
"/uploads/user/avatar/
#{
@user
.
id
}
/
banana_sample.gif
"
end
step
'I should see the "Remove avatar" button'
do
...
...
@@ -42,7 +42,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
step
'I have an avatar'
do
attach_file
(
:user_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
))
attach_file
(
:user_avatar
,
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
))
click_button
"Save changes"
@user
.
reload
end
...
...
features/steps/project/project.rb
View file @
fe942545
...
...
@@ -28,7 +28,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
step
'I change the project avatar'
do
attach_file
(
:project_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
)
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
)
)
click_button
'Save changes'
@project
.
reload
...
...
@@ -37,7 +37,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
step
'I should see new project avatar'
do
expect
(
@project
.
avatar
).
to
be_instance_of
AvatarUploader
url
=
@project
.
avatar
.
url
expect
(
url
).
to
eq
"/uploads/project/avatar/
#{
@project
.
id
}
/
gitlab_logo.png
"
expect
(
url
).
to
eq
"/uploads/project/avatar/
#{
@project
.
id
}
/
banana_sample.gif
"
end
step
'I should see the "Remove avatar" button'
do
...
...
@@ -47,7 +47,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
step
'I have an project avatar'
do
attach_file
(
:project_avatar
,
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
)
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
)
)
click_button
'Save changes'
@project
.
reload
...
...
spec/helpers/application_helper_spec.rb
View file @
fe942545
...
...
@@ -40,15 +40,15 @@ describe ApplicationHelper do
end
describe
'project_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
)
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
)
it
'should return an url for the avatar'
do
project
=
create
(
:project
)
project
.
avatar
=
File
.
open
(
avatar_file_path
)
project
.
save!
avatar_url
=
"http://localhost/uploads/project/avatar/
#{
project
.
id
}
/
gitlab_logo.png
"
avatar_url
=
"http://localhost/uploads/project/avatar/
#{
project
.
id
}
/
banana_sample.gif
"
expect
(
project_icon
(
"
#{
project
.
namespace
.
to_param
}
/
#{
project
.
to_param
}
"
).
to_s
).
to
eq
(
"<img alt=
\"
Gitlab logo
\"
src=
\"
#{
avatar_url
}
\"
/>"
"<img alt=
\"
Banana sample
\"
src=
\"
#{
avatar_url
}
\"
/>"
)
end
...
...
@@ -65,14 +65,14 @@ describe ApplicationHelper do
end
describe
'avatar_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
)
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
)
it
'should return an url for the avatar'
do
user
=
create
(
:user
)
user
.
avatar
=
File
.
open
(
avatar_file_path
)
user
.
save!
expect
(
avatar_icon
(
user
.
email
).
to_s
).
to
match
(
"/uploads/user/avatar/
#{
user
.
id
}
/
gitlab_logo.png
"
)
to
match
(
"/uploads/user/avatar/
#{
user
.
id
}
/
banana_sample.gif
"
)
end
it
'should return an url for the avatar with relative url'
do
...
...
@@ -83,7 +83,7 @@ describe ApplicationHelper do
user
.
avatar
=
File
.
open
(
avatar_file_path
)
user
.
save!
expect
(
avatar_icon
(
user
.
email
).
to_s
).
to
match
(
"/gitlab/uploads/user/avatar/
#{
user
.
id
}
/
gitlab_logo.png
"
)
to
match
(
"/gitlab/uploads/user/avatar/
#{
user
.
id
}
/
banana_sample.gif
"
)
end
it
'should call gravatar_icon when no avatar is present'
do
...
...
spec/helpers/groups_helper.rb
View file @
fe942545
...
...
@@ -2,14 +2,14 @@ require 'spec_helper'
describe
GroupsHelper
do
describe
'group_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
public'
,
'gitlab_logo.png
'
)
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'
spec'
,
'fixtures'
,
'banana_sample.gif
'
)
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
"
)
to
match
(
"/uploads/group/avatar/
#{
group
.
id
}
/
banana_sample.gif
"
)
end
it
'should give default avatar_icon when no avatar is present'
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