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
ac4cbf2e
Commit
ac4cbf2e
authored
May 22, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Group#avatar_url spec
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
60b5db86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
spec/models/group_spec.rb
spec/models/group_spec.rb
+11
-3
No files found.
spec/models/group_spec.rb
View file @
ac4cbf2e
...
...
@@ -194,14 +194,22 @@ describe Group, models: true do
end
context
'when in a geo secondary node'
do
let
(
:geo_url
)
{
'http://geo.example.com'
}
let
(
:geo_host
)
{
'http://geo.example.com'
}
let
(
:geo_avatar_url
)
{
[
geo_host
,
avatar_path
].
join
}
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
allow
(
Gitlab
::
Geo
).
to
receive_message_chain
(
:primary_node
,
:url
)
{
geo_
url
}
allow
(
Gitlab
::
Geo
).
to
receive_message_chain
(
:primary_node
,
:url
)
{
geo_
host
}
end
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
it
'shows correct avatar url'
do
expect
(
group
.
avatar_url
).
to
eq
(
geo_avatar_url
)
expect
(
group
.
avatar_url
(
only_path:
false
)).
to
eq
(
geo_avatar_url
)
allow
(
ActionController
::
Base
).
to
receive
(
:asset_host
).
and_return
(
geo_host
)
expect
(
group
.
avatar_url
).
to
eq
(
geo_avatar_url
)
end
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