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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b24cb998
Commit
b24cb998
authored
Apr 13, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated specs
parent
c0af1fc4
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
13 deletions
+12
-13
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+1
-1
spec/controllers/projects/builds_controller_spec.rb
spec/controllers/projects/builds_controller_spec.rb
+1
-1
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+1
-1
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+6
-7
spec/serializers/build_serializer_spec.rb
spec/serializers/build_serializer_spec.rb
+1
-1
spec/serializers/pipeline_serializer_spec.rb
spec/serializers/pipeline_serializer_spec.rb
+1
-1
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
b24cb998
...
...
@@ -381,7 +381,7 @@
url
:
pageUrl
,
dataType
:
'
json
'
,
success
:
function
(
data
)
{
if
(
data
&&
data
.
icon
)
{
if
(
data
&&
data
.
fav
icon
)
{
gl
.
utils
.
setFavicon
(
data
.
favicon
);
}
else
{
gl
.
utils
.
resetFavicon
();
...
...
spec/controllers/projects/builds_controller_spec.rb
View file @
b24cb998
...
...
@@ -60,7 +60,7 @@ describe Projects::BuildsController do
expect
(
json_response
[
'text'
]).
to
eq
status
.
text
expect
(
json_response
[
'label'
]).
to
eq
status
.
label
expect
(
json_response
[
'icon'
]).
to
eq
status
.
icon
expect
(
json_response
[
'favicon'
]).
to
eq
status
.
favicon
expect
(
json_response
[
'favicon'
]).
to
match
status
.
favicon
end
end
end
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
b24cb998
...
...
@@ -1208,7 +1208,7 @@ describe Projects::MergeRequestsController do
expect
(
json_response
[
'text'
]).
to
eq
status
.
text
expect
(
json_response
[
'label'
]).
to
eq
status
.
label
expect
(
json_response
[
'icon'
]).
to
eq
status
.
icon
expect
(
json_response
[
'favicon'
]).
to
eq
status
.
favicon
expect
(
json_response
[
'favicon'
]).
to
match
status
.
favicon
end
end
...
...
spec/controllers/projects/pipelines_controller_spec.rb
View file @
b24cb998
...
...
@@ -86,7 +86,7 @@ describe Projects::PipelinesController do
expect
(
json_response
[
'text'
]).
to
eq
status
.
text
expect
(
json_response
[
'label'
]).
to
eq
status
.
label
expect
(
json_response
[
'icon'
]).
to
eq
status
.
icon
expect
(
json_response
[
'favicon'
]).
to
eq
status
.
favicon
expect
(
json_response
[
'favicon'
]).
to
match
status
.
favicon
end
end
end
spec/javascripts/lib/utils/common_utils_spec.js
View file @
b24cb998
...
...
@@ -313,7 +313,7 @@ require('~/lib/utils/common_utils');
describe
(
'
gl.utils.setFavicon
'
,
()
=>
{
it
(
'
should set page favicon to provided favicon
'
,
()
=>
{
const
favicon
Name
=
'
custom_favicon
'
;
const
favicon
Path
=
'
//
custom_favicon
'
;
const
fakeLink
=
{
setAttribute
()
{},
};
...
...
@@ -321,9 +321,9 @@ require('~/lib/utils/common_utils');
spyOn
(
window
.
document
,
'
getElementById
'
).
and
.
callFake
(()
=>
fakeLink
);
spyOn
(
fakeLink
,
'
setAttribute
'
).
and
.
callFake
((
attr
,
val
)
=>
{
expect
(
attr
).
toEqual
(
'
href
'
);
expect
(
val
.
indexOf
(
'
/assets/custom_favicon.ico
'
)
>
-
1
).
toBe
(
true
);
expect
(
val
.
indexOf
(
faviconPath
)
>
-
1
).
toBe
(
true
);
});
gl
.
utils
.
setFavicon
(
favicon
Name
);
gl
.
utils
.
setFavicon
(
favicon
Path
);
});
});
...
...
@@ -345,13 +345,12 @@ require('~/lib/utils/common_utils');
describe
(
'
gl.utils.setCiStatusFavicon
'
,
()
=>
{
it
(
'
should set page favicon to CI status favicon based on provided status
'
,
()
=>
{
const
BUILD_URL
=
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/builds-project/builds/1/status.json`
;
const
FAVICON_PATH
=
'
ci_favicons/
'
;
const
FAVICON
=
'
icon_status_success
'
;
const
FAVICON_PATH
=
'
//icon_status_success
'
;
const
spySetFavicon
=
spyOn
(
gl
.
utils
,
'
setFavicon
'
).
and
.
stub
();
const
spyResetFavicon
=
spyOn
(
gl
.
utils
,
'
resetFavicon
'
).
and
.
stub
();
spyOn
(
$
,
'
ajax
'
).
and
.
callFake
(
function
(
options
)
{
options
.
success
({
icon
:
FAVICON
});
expect
(
spySetFavicon
).
toHaveBeenCalledWith
(
FAVICON_PATH
+
FAVICON
);
options
.
success
({
favicon
:
FAVICON_PATH
});
expect
(
spySetFavicon
).
toHaveBeenCalledWith
(
FAVICON_PATH
);
options
.
success
();
expect
(
spyResetFavicon
).
toHaveBeenCalled
();
options
.
error
();
...
...
spec/serializers/build_serializer_spec.rb
View file @
b24cb998
...
...
@@ -38,7 +38,7 @@ describe BuildSerializer do
expect
(
subject
[
:text
]).
to
eq
(
status
.
text
)
expect
(
subject
[
:label
]).
to
eq
(
status
.
label
)
expect
(
subject
[
:icon
]).
to
eq
(
status
.
icon
)
expect
(
subject
[
:favicon
]).
to
eq
(
status
.
favicon
)
expect
(
subject
[
:favicon
]).
to
match
status
.
favicon
end
end
end
...
...
spec/serializers/pipeline_serializer_spec.rb
View file @
b24cb998
...
...
@@ -144,7 +144,7 @@ describe PipelineSerializer do
expect
(
subject
[
:text
]).
to
eq
(
status
.
text
)
expect
(
subject
[
:label
]).
to
eq
(
status
.
label
)
expect
(
subject
[
:icon
]).
to
eq
(
status
.
icon
)
expect
(
subject
[
:favicon
]).
to
eq
(
status
.
favicon
)
expect
(
subject
[
:favicon
]).
to
match
status
.
favicon
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