Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
M
mastodon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chameleoid
AWOO.pub
mastodon
Commits
e878ddb7
Commit
e878ddb7
authored
Jun 03, 2017
by
Yamagishi Kazutoshi
Committed by
Eugen Rochko
Jun 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec for #2388 (#3526)
parent
336f0b08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
spec/controllers/well_known/host_meta_controller_spec.rb
spec/controllers/well_known/host_meta_controller_spec.rb
+1
-1
spec/controllers/well_known/webfinger_controller_spec.rb
spec/controllers/well_known/webfinger_controller_spec.rb
+4
-4
No files found.
spec/controllers/well_known/host_meta_controller_spec.rb
View file @
e878ddb7
...
...
@@ -12,7 +12,7 @@ describe WellKnown::HostMetaController, type: :controller do
expect
(
response
.
body
).
to
eq
<<
XML
<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link rel="lrdd" type="application/xrd+xml" template="http
://test.host
/.well-known/webfinger?resource={uri}"/>
<Link rel="lrdd" type="application/xrd+xml" template="http
s://cb6e6126.ngrok.io
/.well-known/webfinger?resource={uri}"/>
</XRD>
XML
end
...
...
spec/controllers/well_known/webfinger_controller_spec.rb
View file @
e878ddb7
...
...
@@ -50,7 +50,7 @@ PEM
expect
(
response
).
to
have_http_status
(
:success
)
expect
(
response
.
content_type
).
to
eq
'application/jrd+json'
expect
(
response
.
body
).
to
eq
"{
\"
subject
\"
:
\"
acct:alice@cb6e6126.ngrok.io
\"
,
\"
aliases
\"
:[
\"
https://cb6e6126.ngrok.io/@alice
\"
,
\"
https://cb6e6126.ngrok.io/users/alice
\"
],
\"
links
\"
:[{
\"
rel
\"
:
\"
http://webfinger.net/rel/profile-page
\"
,
\"
type
\"
:
\"
text/html
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
http://schemas.google.com/g/2010#updates-from
\"
,
\"
type
\"
:
\"
application/atom+xml
\"
,
\"
href
\"
:
\"
http
://test.host/users/alice.atom
\"
},{
\"
rel
\"
:
\"
self
\"
,
\"
type
\"
:
\"
application/activity+json
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
salmon
\"
,
\"
href
\"
:
\"
#{
api_salmon_url
(
alice
.
id
)
}
\"
},{
\"
rel
\"
:
\"
magic-public-key
\"
,
\"
href
\"
:
\"
data:application/magic-public-key,RSA.x4D6DyZa3zGa1XLhd_VG1bLGvK-Dmyz93WJfWNezIKeSuJkmA0f2NmoOfLUoumq9szN2Xt0GLDX06tDajdYPPXgLtDG0o1qqTrIJ7UTyYhbo94Wotl9iJvEwa5IjP1Mn00YJ_KvFrzKCm15PC7up6r-NtHsqoYS8X1KAqcbnptU=.AQAB
\"
},{
\"
rel
\"
:
\"
http://ostatus.org/schema/1.0/subscribe
\"
,
\"
template
\"
:
\"
http://test.host
/authorize_follow?acct={uri}
\"
}]}"
expect
(
response
.
body
).
to
eq
"{
\"
subject
\"
:
\"
acct:alice@cb6e6126.ngrok.io
\"
,
\"
aliases
\"
:[
\"
https://cb6e6126.ngrok.io/@alice
\"
,
\"
https://cb6e6126.ngrok.io/users/alice
\"
],
\"
links
\"
:[{
\"
rel
\"
:
\"
http://webfinger.net/rel/profile-page
\"
,
\"
type
\"
:
\"
text/html
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
http://schemas.google.com/g/2010#updates-from
\"
,
\"
type
\"
:
\"
application/atom+xml
\"
,
\"
href
\"
:
\"
http
s://cb6e6126.ngrok.io/users/alice.atom
\"
},{
\"
rel
\"
:
\"
self
\"
,
\"
type
\"
:
\"
application/activity+json
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
salmon
\"
,
\"
href
\"
:
\"
#{
api_salmon_url
(
alice
.
id
)
}
\"
},{
\"
rel
\"
:
\"
magic-public-key
\"
,
\"
href
\"
:
\"
data:application/magic-public-key,RSA.x4D6DyZa3zGa1XLhd_VG1bLGvK-Dmyz93WJfWNezIKeSuJkmA0f2NmoOfLUoumq9szN2Xt0GLDX06tDajdYPPXgLtDG0o1qqTrIJ7UTyYhbo94Wotl9iJvEwa5IjP1Mn00YJ_KvFrzKCm15PC7up6r-NtHsqoYS8X1KAqcbnptU=.AQAB
\"
},{
\"
rel
\"
:
\"
http://ostatus.org/schema/1.0/subscribe
\"
,
\"
template
\"
:
\"
https://cb6e6126.ngrok.io
/authorize_follow?acct={uri}
\"
}]}"
end
it
'returns JSON when account can be found'
do
...
...
@@ -65,10 +65,10 @@ PEM
<Alias>https://cb6e6126.ngrok.io/@alice</Alias>
<Alias>https://cb6e6126.ngrok.io/users/alice</Alias>
<Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="https://cb6e6126.ngrok.io/@alice"/>
<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http
://test.host
/users/alice.atom"/>
<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http
s://cb6e6126.ngrok.io
/users/alice.atom"/>
<Link rel="salmon" href="
#{
api_salmon_url
(
alice
.
id
)
}
"/>
<Link rel="magic-public-key" href="data:application/magic-public-key,RSA.x4D6DyZa3zGa1XLhd_VG1bLGvK-Dmyz93WJfWNezIKeSuJkmA0f2NmoOfLUoumq9szN2Xt0GLDX06tDajdYPPXgLtDG0o1qqTrIJ7UTyYhbo94Wotl9iJvEwa5IjP1Mn00YJ_KvFrzKCm15PC7up6r-NtHsqoYS8X1KAqcbnptU=.AQAB"/>
<Link rel="http://ostatus.org/schema/1.0/subscribe" template="http
://test.host
/authorize_follow?acct={uri}"/>
<Link rel="http://ostatus.org/schema/1.0/subscribe" template="http
s://cb6e6126.ngrok.io
/authorize_follow?acct={uri}"/>
</XRD>
XML
end
...
...
@@ -87,7 +87,7 @@ XML
expect
(
response
).
to
have_http_status
(
:success
)
expect
(
response
.
content_type
).
to
eq
'application/jrd+json'
expect
(
response
.
body
).
to
eq
"{
\"
subject
\"
:
\"
acct:alice@cb6e6126.ngrok.io
\"
,
\"
aliases
\"
:[
\"
https://cb6e6126.ngrok.io/@alice
\"
,
\"
https://cb6e6126.ngrok.io/users/alice
\"
],
\"
links
\"
:[{
\"
rel
\"
:
\"
http://webfinger.net/rel/profile-page
\"
,
\"
type
\"
:
\"
text/html
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
http://schemas.google.com/g/2010#updates-from
\"
,
\"
type
\"
:
\"
application/atom+xml
\"
,
\"
href
\"
:
\"
http
://test.host/users/alice.atom
\"
},{
\"
rel
\"
:
\"
self
\"
,
\"
type
\"
:
\"
application/activity+json
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
salmon
\"
,
\"
href
\"
:
\"
#{
api_salmon_url
(
alice
.
id
)
}
\"
},{
\"
rel
\"
:
\"
magic-public-key
\"
,
\"
href
\"
:
\"
data:application/magic-public-key,RSA.x4D6DyZa3zGa1XLhd_VG1bLGvK-Dmyz93WJfWNezIKeSuJkmA0f2NmoOfLUoumq9szN2Xt0GLDX06tDajdYPPXgLtDG0o1qqTrIJ7UTyYhbo94Wotl9iJvEwa5IjP1Mn00YJ_KvFrzKCm15PC7up6r-NtHsqoYS8X1KAqcbnptU=.AQAB
\"
},{
\"
rel
\"
:
\"
http://ostatus.org/schema/1.0/subscribe
\"
,
\"
template
\"
:
\"
http://test.host
/authorize_follow?acct={uri}
\"
}]}"
expect
(
response
.
body
).
to
eq
"{
\"
subject
\"
:
\"
acct:alice@cb6e6126.ngrok.io
\"
,
\"
aliases
\"
:[
\"
https://cb6e6126.ngrok.io/@alice
\"
,
\"
https://cb6e6126.ngrok.io/users/alice
\"
],
\"
links
\"
:[{
\"
rel
\"
:
\"
http://webfinger.net/rel/profile-page
\"
,
\"
type
\"
:
\"
text/html
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
http://schemas.google.com/g/2010#updates-from
\"
,
\"
type
\"
:
\"
application/atom+xml
\"
,
\"
href
\"
:
\"
http
s://cb6e6126.ngrok.io/users/alice.atom
\"
},{
\"
rel
\"
:
\"
self
\"
,
\"
type
\"
:
\"
application/activity+json
\"
,
\"
href
\"
:
\"
https://cb6e6126.ngrok.io/@alice
\"
},{
\"
rel
\"
:
\"
salmon
\"
,
\"
href
\"
:
\"
#{
api_salmon_url
(
alice
.
id
)
}
\"
},{
\"
rel
\"
:
\"
magic-public-key
\"
,
\"
href
\"
:
\"
data:application/magic-public-key,RSA.x4D6DyZa3zGa1XLhd_VG1bLGvK-Dmyz93WJfWNezIKeSuJkmA0f2NmoOfLUoumq9szN2Xt0GLDX06tDajdYPPXgLtDG0o1qqTrIJ7UTyYhbo94Wotl9iJvEwa5IjP1Mn00YJ_KvFrzKCm15PC7up6r-NtHsqoYS8X1KAqcbnptU=.AQAB
\"
},{
\"
rel
\"
:
\"
http://ostatus.org/schema/1.0/subscribe
\"
,
\"
template
\"
:
\"
https://cb6e6126.ngrok.io
/authorize_follow?acct={uri}
\"
}]}"
end
it
'returns http not found when account can not be found with alternate domains'
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