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
0f90c1fd
Commit
0f90c1fd
authored
Jun 11, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use Rails.root.join for upload fixture paths
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
4274aeef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
spec/controllers/uploads_controller_spec.rb
spec/controllers/uploads_controller_spec.rb
+1
-1
spec/lib/gitlab/favicon_spec.rb
spec/lib/gitlab/favicon_spec.rb
+1
-1
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+1
-1
spec/uploaders/favicon_uploader_spec.rb
spec/uploaders/favicon_uploader_spec.rb
+1
-1
No files found.
spec/controllers/uploads_controller_spec.rb
View file @
0f90c1fd
...
...
@@ -562,7 +562,7 @@ describe UploadsController do
end
context
'original filename or a version filename must match'
do
let!
(
:appearance
)
{
create
:appearance
,
favicon:
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/dk.png'
)
,
'image/png'
)
}
let!
(
:appearance
)
{
create
:appearance
,
favicon:
fixture_file_upload
(
'spec/fixtures/dk.png'
,
'image/png'
)
}
context
'has a valid filename on the original file'
do
it
'successfully returns the file'
do
...
...
spec/lib/gitlab/favicon_spec.rb
View file @
0f90c1fd
...
...
@@ -18,7 +18,7 @@ RSpec.describe Gitlab::Favicon, :request_store do
end
it
'uses the custom favicon if a favicon appearance is present'
do
create
:appearance
,
favicon:
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/dk.png'
)
)
create
:appearance
,
favicon:
fixture_file_upload
(
'spec/fixtures/dk.png'
)
expect
(
described_class
.
main
).
to
match
%r{/uploads/-/system/appearance/favicon/
\d
+/favicon_main_dk.png}
end
end
...
...
spec/models/project_services/jira_service_spec.rb
View file @
0f90c1fd
...
...
@@ -475,7 +475,7 @@ describe JiraService do
end
it
'includes returns the custom favicon'
do
create
:appearance
,
favicon:
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/dk.png'
)
)
create
:appearance
,
favicon:
fixture_file_upload
(
'spec/fixtures/dk.png'
)
props
=
described_class
.
new
.
send
(
:build_remote_link_props
,
url:
'http://example.com'
,
title:
'title'
)
expect
(
props
[
:object
][
:icon
][
:url16x16
]).
to
match
%r{^http://localhost/uploads/-/system/appearance/favicon/
\d
+/favicon_main_dk.png$}
...
...
spec/uploaders/favicon_uploader_spec.rb
View file @
0f90c1fd
...
...
@@ -10,7 +10,7 @@ RSpec.describe FaviconUploader do
end
def
upload_fixture
(
filename
)
fixture_file_upload
(
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
filename
)
)
fixture_file_upload
(
"spec/fixtures/
#{
filename
}
"
)
end
context
'versions'
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