Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8e7f63af
Commit
8e7f63af
authored
Feb 25, 2018
by
lain
Browse files
Fix specs.
parent
dfaddeb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/user.ex
View file @
8e7f63af
...
...
@@ -450,4 +450,5 @@ def insert_or_update_user(data) do
end
def
ap_enabled?
(%
User
{
info:
info
}),
do
:
info
[
"ap_enabled"
]
def
ap_enabled?
(
_
),
do
:
false
end
test/web/activity_pub/activity_pub_controller_test.exs
View file @
8e7f63af
...
...
@@ -3,6 +3,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
import
Pleroma
.
Factory
alias
Pleroma
.
Web
.
ActivityPub
.
{
UserView
,
ObjectView
}
alias
Pleroma
.
{
Repo
,
User
}
alias
Pleroma
.
Activity
describe
"/users/:nickname"
do
test
"it returns a json representation of the user"
,
%{
conn:
conn
}
do
...
...
@@ -38,9 +39,11 @@ test "it inserts an incoming activity into the database", %{conn: conn} do
conn
=
conn
|>
assign
(
:valid_signature
,
true
)
|>
put_req_header
(
"content-type"
,
"application/activity+json"
)
|>
post
(
"/
users/doesntmatter/
inbox"
,
data
)
|>
post
(
"/inbox"
,
data
)
assert
"ok"
==
json_response
(
conn
,
200
)
:timer
.
sleep
(
500
)
assert
Activity
.
get_by_ap_id
(
data
[
"id"
])
end
end
end
Write
Preview
Supports
Markdown
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