diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-11-21 19:47:46 +0300 | 
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-11-21 19:47:46 +0300 | 
| commit | 489b12cde48d0ed6b16914c5a831b1e992d0d059 (patch) | |
| tree | 2928b5b9111339f16a5642c4ec07c82851c4f7ed /test/fixtures | |
| parent | ccc2cf0e87f47618163da588ead76846c64cba7a (diff) | |
| parent | ecd1ef8cb5afa16dba5158e9e278a18c0856ca3e (diff) | |
| download | pleroma-489b12cde48d0ed6b16914c5a831b1e992d0d059.tar.gz pleroma-489b12cde48d0ed6b16914c5a831b1e992d0d059.zip  | |
Merge remote-tracking branch 'remotes/origin/develop' into auth-improvements
Diffstat (limited to 'test/fixtures')
| -rw-r--r-- | test/fixtures/mastodon/application_actor.json | 67 | ||||
| -rw-r--r-- | test/fixtures/modules/good_mrf.ex | 19 | ||||
| -rw-r--r-- | test/fixtures/spoofed-object.json | 26 | 
3 files changed, 112 insertions, 0 deletions
diff --git a/test/fixtures/mastodon/application_actor.json b/test/fixtures/mastodon/application_actor.json new file mode 100644 index 000000000..2089ea049 --- /dev/null +++ b/test/fixtures/mastodon/application_actor.json @@ -0,0 +1,67 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    "https://w3id.org/security/v1", +    { +      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", +      "toot": "http://joinmastodon.org/ns#", +      "featured": { +        "@id": "toot:featured", +        "@type": "@id" +      }, +      "alsoKnownAs": { +        "@id": "as:alsoKnownAs", +        "@type": "@id" +      }, +      "movedTo": { +        "@id": "as:movedTo", +        "@type": "@id" +      }, +      "schema": "http://schema.org#", +      "PropertyValue": "schema:PropertyValue", +      "value": "schema:value", +      "IdentityProof": "toot:IdentityProof", +      "discoverable": "toot:discoverable", +      "Device": "toot:Device", +      "Ed25519Signature": "toot:Ed25519Signature", +      "Ed25519Key": "toot:Ed25519Key", +      "Curve25519Key": "toot:Curve25519Key", +      "EncryptedMessage": "toot:EncryptedMessage", +      "publicKeyBase64": "toot:publicKeyBase64", +      "deviceId": "toot:deviceId", +      "claim": { +        "@type": "@id", +        "@id": "toot:claim" +      }, +      "fingerprintKey": { +        "@type": "@id", +        "@id": "toot:fingerprintKey" +      }, +      "identityKey": { +        "@type": "@id", +        "@id": "toot:identityKey" +      }, +      "devices": { +        "@type": "@id", +        "@id": "toot:devices" +      }, +      "messageFranking": "toot:messageFranking", +      "messageType": "toot:messageType", +      "cipherText": "toot:cipherText" +    } +  ], +  "id": "https://{{DOMAIN}}/actor", +  "type": "Application", +  "inbox": "https://{{DOMAIN}}/actor/inbox", +  "preferredUsername": "{{DOMAIN}}", +  "url": "https://{{DOMAIN}}/about/more?instance_actor=true", +  "manuallyApprovesFollowers": true, +  "publicKey": { +    "id": "https://{{DOMAIN}}/actor#main-key", +    "owner": "https://{{DOMAIN}}/actor", +    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAA0CA08AMIIBCgKCAQEAyi2T2FFZJgRPY+96YQrn\n6J6eF2P60J+nz+/pRc/acv/Nx+NLxxPyXby0F2s60MV7uALRQbBBnf7oNKCd/T4S\nvbr7UXMCWTdaJBpYubMKWT9uBlaUUkUfqL+WTV+IQnlcKtssQ4+AwrAKAZXza8ws\nZypevOsLHzayyEzztmm1KQC9GCUOITCLf7Q6qEhy8z/HuqLBEC0Own0pD7QsbfcS\no1peuZY7g1E/jJ9HR9GqJccMaR0H28KmJ7tT1Yzlyf5uZMRIdPxsoMR9sGLjR2B8\noegSwaf9SogR3ScP395Tt/9Ud1VVzuhpoS8Uy7jKSs+3CuLJsEGoMrib8VyOwadS\n9wIDAQAB\n-----END PUBLIC KEY-----\n" +  }, +  "endpoints": { +    "sharedInbox": "https://{{DOMAIN}}/inbox" +  } +} diff --git a/test/fixtures/modules/good_mrf.ex b/test/fixtures/modules/good_mrf.ex new file mode 100644 index 000000000..39d0f14ec --- /dev/null +++ b/test/fixtures/modules/good_mrf.ex @@ -0,0 +1,19 @@ +defmodule Fixtures.Modules.GoodMRF do +  @behaviour Pleroma.Web.ActivityPub.MRF + +  @impl true +  def filter(a), do: {:ok, a} + +  @impl true +  def describe, do: %{} + +  @impl true +  def config_description do +    %{ +      key: :good_mrf, +      related_policy: "Fixtures.Modules.GoodMRF", +      label: "Good MRF", +      description: "Some description" +    } +  end +end diff --git a/test/fixtures/spoofed-object.json b/test/fixtures/spoofed-object.json new file mode 100644 index 000000000..91e34307d --- /dev/null +++ b/test/fixtures/spoofed-object.json @@ -0,0 +1,26 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    "https://patch.cx/schemas/litepub-0.1.jsonld", +    { +      "@language": "und" +    } +  ], +  "actor": "https://patch.cx/users/rin", +  "attachment": [], +  "attributedTo": "https://patch.cx/users/rin", +  "cc": [ +    "https://patch.cx/users/rin/followers" +  ], +  "content": "Oracle Corporation (NYSE: ORCL) today announced that it has signed a definitive merger agreement to acquire Pleroma AG (FRA: PLA), for $26.50 per share (approximately $10.3 billion). The transaction has been approved by the boards of directors of both companies and should close by early January.", +  "context": "https://patch.cx/contexts/spoof", +  "id": "https://patch.cx/objects/spoof", +  "published": "2020-10-23T18:02:06.038856Z", +  "sensitive": false, +  "summary": "Oracle buys Pleroma", +  "tag": [], +  "to": [ +    "https://www.w3.org/ns/activitystreams#Public" +  ], +  "type": "Note" +}  | 
