do
changeset = Changeset.change(subscription, %{state: "active"})
Repo.update(changeset)
- else _e ->
- changeset = Changeset.change(subscription, %{state: "rejected"})
- {:ok, subscription} = Repo.update(changeset)
+ else e ->
+ Logger.debug("Couldn't verify subscription")
+ Logger.debug(inspect(e))
{:error, subscription}
end
end
end
{:error, sub} = Websub.verify(sub, getter)
- assert sub.state == "rejected"
+ # Keep the current state.
+ assert sub.state == "requested"
end
test "an incoming subscription request" do