Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F41647073
push_subscription_view_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
789 B
Referenced Files
None
Subscribers
None
push_subscription_view_test.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.MastodonAPI.PushSubscriptionViewTest
do
use
Pleroma.DataCase
import
Pleroma.Factory
alias
Pleroma.Web.MastodonAPI.PushSubscriptionView
,
as
:
View
alias
Pleroma.Web.Push
test
"Represent a subscription"
do
subscription
=
insert
(
:push_subscription
,
data
:
%{
"alerts"
=>
%{
"mention"
=>
true
}})
expected
=
%{
alerts
:
%{
"mention"
=>
true
},
endpoint
:
subscription
.
endpoint
,
id
:
to_string
(
subscription
.
id
),
server_key
:
Keyword
.
get
(
Push
.
vapid_config
(),
:public_key
)
}
assert
expected
==
View
.
render
(
"push_subscription.json"
,
%{
subscription
:
subscription
})
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 15, 4:38 AM (13 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
978799
Default Alt Text
push_subscription_view_test.exs (789 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment