Update nodeinfo_controller_test.exs
This commit is contained in:
parent
95df5ed0e0
commit
2d98fee0c3
1 changed files with 32 additions and 28 deletions
|
@ -1,10 +1,14 @@
|
|||
defmodule NullaWeb.NodeinfoControllerTest do
|
||||
use NullaWeb.ConnCase
|
||||
alias Nulla.KeyGen
|
||||
alias Nulla.Models.User
|
||||
alias Nulla.Models.Actor
|
||||
|
||||
setup do
|
||||
{:ok, actor} = Actor.create_actor(%{
|
||||
{publicKeyPem, privateKeyPem} = KeyGen.gen()
|
||||
|
||||
{:ok, actor} =
|
||||
Actor.create_actor(%{
|
||||
domain: "localhost",
|
||||
ap_id: "http://localhost/users/test",
|
||||
type: "Person",
|
||||
|
@ -27,7 +31,7 @@ defmodule NullaWeb.NodeinfoControllerTest do
|
|||
Jason.OrderedObject.new(
|
||||
id: "http://localhost/users/test#main-key",
|
||||
owner: "http://localhost/users/test",
|
||||
publicKeyPem: "PUBLIC KEY"
|
||||
publicKeyPem: publicKeyPem
|
||||
),
|
||||
endpoints: Jason.OrderedObject.new(sharedInbox: "http://localhost/inbox")
|
||||
})
|
||||
|
@ -36,7 +40,7 @@ defmodule NullaWeb.NodeinfoControllerTest do
|
|||
id: actor.id,
|
||||
email: "test@localhost",
|
||||
password: "password",
|
||||
privateKeyPem: "PRIVATE KEY",
|
||||
privateKeyPem: privateKeyPem,
|
||||
last_active_at: DateTime.utc_now()
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue