Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pleroma
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
342
Issues
342
List
Boards
Labels
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pleroma
pleroma
Commits
c2ae6310
Commit
c2ae6310
authored
Oct 18, 2019
by
kaniini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: mastodon api: fix broken test that used OStatus
parent
44e64af5
Pipeline
#18814
passed with stages
in 12 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
test/web/mastodon_api/views/status_view_test.exs
test/web/mastodon_api/views/status_view_test.exs
+11
-14
No files found.
test/web/mastodon_api/views/status_view_test.exs
View file @
c2ae6310
...
...
@@ -228,20 +228,17 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert
status
.
in_reply_to_id
==
to_string
(
note
.
id
)
end
# XXX: fix this test
# test "contains mentions" do
# incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
# # a user with this ap id might be in the cache.
# recipient = "https://pleroma.soykaf.com/users/lain"
# user = insert(:user, %{ap_id: recipient})
#
# {:ok, [activity]} = OStatus.handle_incoming(incoming)
#
# status = StatusView.render("show.json", %{activity: activity})
#
# assert status.mentions ==
# Enum.map([user], fn u -> AccountView.render("mention.json", %{user: u}) end)
# end
test
"contains mentions"
do
user
=
insert
(
:user
)
mentioned
=
insert
(
:user
)
{
:ok
,
activity
}
=
CommonAPI
.
post
(
user
,
%{
"status"
=>
"hi @
#{
mentioned
.
nickname
}
"
})
status
=
StatusView
.
render
(
"show.json"
,
%{
activity:
activity
})
assert
status
.
mentions
==
Enum
.
map
([
mentioned
],
fn
u
->
AccountView
.
render
(
"mention.json"
,
%{
user:
u
})
end
)
end
test
"create mentions from the 'to' field"
do
%
User
{
ap_id:
recipient_ap_id
}
=
insert
(
:user
)
...
...
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