Only have one subscription per callback.
This commit is contained in:
parent
1feb193731
commit
8fb73c28bb
6 changed files with 107 additions and 48 deletions
|
|
@ -1,8 +1,6 @@
|
|||
defmodule Pleroma.Web.Websub.WebsubControllerTest do
|
||||
use Pleroma.Web.ConnCase
|
||||
import Pleroma.Factory
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.Web.Websub.WebsubServerSubscription
|
||||
|
||||
test "websub subscription request", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
|
|
@ -21,11 +19,5 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
|
|||
|> post(path, data)
|
||||
|
||||
assert response(conn, 202) == "Accepted"
|
||||
subscription = Repo.one!(WebsubServerSubscription)
|
||||
assert subscription.topic == Pleroma.Web.OStatus.feed_path(user)
|
||||
assert subscription.state == "requested"
|
||||
assert subscription.secret == "a random secret"
|
||||
assert subscription.callback == "http://example.org/sub"
|
||||
assert subscription.valid_until == NaiveDateTime.add(subscription.inserted_at, 100)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue