diff options
Diffstat (limited to 'test/fixtures')
| -rw-r--r-- | test/fixtures/bridgy/actor.json | 80 | ||||
| -rw-r--r-- | test/fixtures/config/temp.exported_from_db.secret.exs | 5 | ||||
| -rw-r--r-- | test/fixtures/mastodon/collections/featured.json | 39 | ||||
| -rw-r--r-- | test/fixtures/statuses/masto-note.json | 47 | ||||
| -rw-r--r-- | test/fixtures/statuses/note.json | 27 | ||||
| -rw-r--r-- | test/fixtures/tesla_mock/emoji-in-summary.json | 49 | ||||
| -rw-r--r-- | test/fixtures/tesla_mock/xn--q9jyb4c_host_meta | 4 | ||||
| -rw-r--r-- | test/fixtures/users_mock/masto_featured.json | 18 | ||||
| -rw-r--r-- | test/fixtures/users_mock/user.json | 42 | 
9 files changed, 307 insertions, 4 deletions
| diff --git a/test/fixtures/bridgy/actor.json b/test/fixtures/bridgy/actor.json new file mode 100644 index 000000000..5b2d8982b --- /dev/null +++ b/test/fixtures/bridgy/actor.json @@ -0,0 +1,80 @@ +{ +  "id": "https://fed.brid.gy/jk.nipponalba.scot", +  "url": "https://fed.brid.gy/r/https://jk.nipponalba.scot", +  "urls": [ +    { +      "value": "https://jk.nipponalba.scot" +    }, +    { +      "value": "https://social.nipponalba.scot/jk" +    }, +    { +      "value": "https://px.nipponalba.scot/jk" +    } +  ], +  "@context": "https://www.w3.org/ns/activitystreams", +  "type": "Person", +  "name": "J K 🇯🇵🏴", +  "image": [ +    { +      "url": "https://jk.nipponalba.scot/images/profile.jpg", +      "type": "Image", +      "name": "profile picture" +    } +  ], +  "tag": [ +    { +      "type": "Tag", +      "name": "Craft Beer" +    }, +    { +      "type": "Tag", +      "name": "Single Malt Whisky" +    }, +    { +      "type": "Tag", +      "name": "Homebrewing" +    }, +    { +      "type": "Tag", +      "name": "Scottish Politics" +    }, +    { +      "type": "Tag", +      "name": "Scottish History" +    }, +    { +      "type": "Tag", +      "name": "Japanese History" +    }, +    { +      "type": "Tag", +      "name": "Tech" +    }, +    { +      "type": "Tag", +      "name": "Veganism" +    }, +    { +      "type": "Tag", +      "name": "Cooking" +    } +  ], +  "icon": [ +    { +      "url": "https://jk.nipponalba.scot/images/profile.jpg", +      "type": "Image", +      "name": "profile picture" +    } +  ], +  "preferredUsername": "jk.nipponalba.scot", +  "summary": "", +  "publicKey": { +    "id": "jk.nipponalba.scot", +    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdarxwzxnNbJ2hneWOYHkYJowk\npyigQtxlUd0VjgSQHwxU9kWqfbrHBVADyTtcqi/4dAzQd3UnCI1TPNnn4LPZY9PW\noiWd3Zl1/EfLFxO7LU9GS7fcSLQkyj5JNhSlN3I8QPudZbybrgRDVZYooDe1D+52\n5KLGqC2ajrIVOiDRTQIDAQAB\n-----END PUBLIC KEY-----" +  }, +  "inbox": "https://fed.brid.gy/jk.nipponalba.scot/inbox", +  "outbox": "https://fed.brid.gy/jk.nipponalba.scot/outbox", +  "following": "https://fed.brid.gy/jk.nipponalba.scot/following", +  "followers": "https://fed.brid.gy/jk.nipponalba.scot/followers" +} diff --git a/test/fixtures/config/temp.exported_from_db.secret.exs b/test/fixtures/config/temp.exported_from_db.secret.exs new file mode 100644 index 000000000..64bee7f32 --- /dev/null +++ b/test/fixtures/config/temp.exported_from_db.secret.exs @@ -0,0 +1,5 @@ +use Mix.Config + +config :pleroma, exported_config_merged: true + +config :pleroma, :first_setting, key: "new value" diff --git a/test/fixtures/mastodon/collections/featured.json b/test/fixtures/mastodon/collections/featured.json new file mode 100644 index 000000000..56f8f56fa --- /dev/null +++ b/test/fixtures/mastodon/collections/featured.json @@ -0,0 +1,39 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    "https://{{domain}}/schemas/litepub-0.1.jsonld", +    { +      "@language": "und" +    } +  ], +  "id": "https://{{domain}}/users/{{nickname}}/collections/featured", +  "orderedItems": [ +    { +      "@context": [ +        "https://www.w3.org/ns/activitystreams", +        "https://{{domain}}/schemas/litepub-0.1.jsonld", +        { +          "@language": "und" +        } +      ], +      "actor": "https://{{domain}}/users/{{nickname}}", +      "attachment": [], +      "attributedTo": "https://{{domain}}/users/{{nickname}}", +      "cc": [ +        "https://{{domain}}/users/{{nickname}}/followers" +      ], +      "content": "", +      "id": "https://{{domain}}/objects/{{object_id}}", +      "published": "2021-02-12T15:13:43.915429Z", +      "sensitive": false, +      "source": "", +      "summary": "", +      "tag": [], +      "to": [ +        "https://www.w3.org/ns/activitystreams#Public" +      ], +      "type": "Note" +    } +  ], +  "type": "OrderedCollection" +} diff --git a/test/fixtures/statuses/masto-note.json b/test/fixtures/statuses/masto-note.json new file mode 100644 index 000000000..6b96de473 --- /dev/null +++ b/test/fixtures/statuses/masto-note.json @@ -0,0 +1,47 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    { +      "ostatus": "http://ostatus.org#", +      "atomUri": "ostatus:atomUri", +      "inReplyToAtomUri": "ostatus:inReplyToAtomUri", +      "conversation": "ostatus:conversation", +      "sensitive": "as:sensitive", +      "toot": "http://joinmastodon.org/ns#", +      "votersCount": "toot:votersCount" +    } +  ], +  "id": "https://example.com/users/{{nickname}}/statuses/{{status_id}}", +  "type": "Note", +  "summary": null, +  "inReplyTo": null, +  "published": "2021-02-24T12:40:49Z", +  "url": "https://example.com/@{{nickname}}/{{status_id}}", +  "attributedTo": "https://example.com/users/{{nickname}}", +  "to": [ +    "https://www.w3.org/ns/activitystreams#Public" +  ], +  "cc": [ +    "https://example.com/users/{{nickname}}/followers" +  ], +  "sensitive": false, +  "atomUri": "https://example.com/users/{{nickname}}/statuses/{{status_id}}", +  "inReplyToAtomUri": null, +  "conversation": "tag:example.com,2021-02-24:objectId=15:objectType=Conversation", +  "content": "<p></p>", +  "contentMap": { +    "en": "<p></p>" +  }, +  "attachment": [], +  "tag": [], +  "replies": { +    "id": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies", +    "type": "Collection", +    "first": { +      "type": "CollectionPage", +      "next": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies?only_other_accounts=true&page=true", +      "partOf": "https://example.com/users/{{nickname}}/statuses/{{status_id}}/replies", +      "items": [] +    } +  } +} diff --git a/test/fixtures/statuses/note.json b/test/fixtures/statuses/note.json new file mode 100644 index 000000000..41735cbc5 --- /dev/null +++ b/test/fixtures/statuses/note.json @@ -0,0 +1,27 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    "https://example.com/schemas/litepub-0.1.jsonld", +    { +      "@language": "und" +    } +  ], +  "actor": "https://example.com/users/{{nickname}}", +  "attachment": [], +  "attributedTo": "https://example.com/users/{{nickname}}", +  "cc": [ +    "https://example.com/users/{{nickname}}/followers" +  ], +  "content": "Content", +  "context": "https://example.com/contexts/e4b180e1-7403-477f-aeb4-de57e7a3fe7f", +  "conversation": "https://example.com/contexts/e4b180e1-7403-477f-aeb4-de57e7a3fe7f", +  "id": "https://example.com/objects/{{object_id}}", +  "published": "2019-12-15T22:00:05.279583Z", +  "sensitive": false, +  "summary": "", +  "tag": [], +  "to": [ +    "https://www.w3.org/ns/activitystreams#Public" +  ], +  "type": "Note" +} diff --git a/test/fixtures/tesla_mock/emoji-in-summary.json b/test/fixtures/tesla_mock/emoji-in-summary.json new file mode 100644 index 000000000..f77c6e2e8 --- /dev/null +++ b/test/fixtures/tesla_mock/emoji-in-summary.json @@ -0,0 +1,49 @@ +{ +  "@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": ":joker_disapprove: <br><br>just grabbing a test fixture, nevermind me", +  "context": "https://patch.cx/contexts/2c3ce4b4-18b1-4b1a-8965-3932027b5326", +  "conversation": "https://patch.cx/contexts/2c3ce4b4-18b1-4b1a-8965-3932027b5326", +  "id": "https://patch.cx/objects/a399c28e-c821-4820-bc3e-4afeb044c16f", +  "published": "2021-03-22T16:54:46.461939Z", +  "sensitive": null, +  "source": ":joker_disapprove: \r\n\r\njust grabbing a test fixture, nevermind me", +  "summary": ":joker_smile: ", +  "tag": [ +    { +      "icon": { +        "type": "Image", +        "url": "https://patch.cx/emoji/custom/joker_disapprove.png" +      }, +      "id": "https://patch.cx/emoji/custom/joker_disapprove.png", +      "name": ":joker_disapprove:", +      "type": "Emoji", +      "updated": "1970-01-01T00:00:00Z" +    }, +    { +      "icon": { +        "type": "Image", +        "url": "https://patch.cx/emoji/custom/joker_smile.png" +      }, +      "id": "https://patch.cx/emoji/custom/joker_smile.png", +      "name": ":joker_smile:", +      "type": "Emoji", +      "updated": "1970-01-01T00:00:00Z" +    } +  ], +  "to": [ +    "https://www.w3.org/ns/activitystreams#Public" +  ], +  "type": "Note" +} diff --git a/test/fixtures/tesla_mock/xn--q9jyb4c_host_meta b/test/fixtures/tesla_mock/xn--q9jyb4c_host_meta deleted file mode 100644 index 45d260e55..000000000 --- a/test/fixtures/tesla_mock/xn--q9jyb4c_host_meta +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> -    <Link rel="lrdd" template="https://zetsubou.xn--q9jyb4c/.well-known/webfinger?resource={uri}" type="application/xrd+xml" /> -</XRD> diff --git a/test/fixtures/users_mock/masto_featured.json b/test/fixtures/users_mock/masto_featured.json new file mode 100644 index 000000000..646a343ad --- /dev/null +++ b/test/fixtures/users_mock/masto_featured.json @@ -0,0 +1,18 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    { +      "ostatus": "http://ostatus.org#", +      "atomUri": "ostatus:atomUri", +      "inReplyToAtomUri": "ostatus:inReplyToAtomUri", +      "conversation": "ostatus:conversation", +      "sensitive": "as:sensitive", +      "toot": "http://joinmastodon.org/ns#", +      "votersCount": "toot:votersCount" +    } +  ], +  "id": "https://{{domain}}/users/{{nickname}}/collections/featured", +  "type": "OrderedCollection", +  "totalItems": 0, +  "orderedItems": [] +} diff --git a/test/fixtures/users_mock/user.json b/test/fixtures/users_mock/user.json new file mode 100644 index 000000000..c722a1145 --- /dev/null +++ b/test/fixtures/users_mock/user.json @@ -0,0 +1,42 @@ +{ +  "@context": [ +    "https://www.w3.org/ns/activitystreams", +    "https://example.com/schemas/litepub-0.1.jsonld", +    { +      "@language": "und" +    } +  ], +  "attachment": [], +  "endpoints": { +    "oauthAuthorizationEndpoint": "https://example.com/oauth/authorize", +    "oauthRegistrationEndpoint": "https://example.com/api/v1/apps", +    "oauthTokenEndpoint": "https://example.com/oauth/token", +    "sharedInbox": "https://example.com/inbox" +  }, +  "followers": "https://example.com/users/{{nickname}}/followers", +  "following": "https://example.com/users/{{nickname}}/following", +  "icon": { +    "type": "Image", +    "url": "https://example.com/media/4e914f5b84e4a259a3f6c2d2edc9ab642f2ab05f3e3d9c52c81fc2d984b3d51e.jpg" +  }, +  "id": "https://example.com/users/{{nickname}}", +  "image": { +    "type": "Image", +    "url": "https://example.com/media/f739efddefeee49c6e67e947c4811fdc911785c16ae43da4c3684051fbf8da6a.jpg?name=f739efddefeee49c6e67e947c4811fdc911785c16ae43da4c3684051fbf8da6a.jpg" +  }, +  "inbox": "https://example.com/users/{{nickname}}/inbox", +  "manuallyApprovesFollowers": false, +  "name": "{{nickname}}", +  "outbox": "https://example.com/users/{{nickname}}/outbox", +  "preferredUsername": "{{nickname}}", +  "publicKey": { +    "id": "https://example.com/users/{{nickname}}#main-key", +    "owner": "https://example.com/users/{{nickname}}", +    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5DLtwGXNZElJyxFGfcVc\nXANhaMadj/iYYQwZjOJTV9QsbtiNBeIK54PJrYuU0/0YIdrvS1iqheX5IwXRhcwa\nhm3ZyLz7XeN9st7FBni4BmZMBtMpxAuYuu5p/jbWy13qAiYOhPreCx0wrWgm/lBD\n9mkgaxIxPooBE0S4ZWEJIDIV1Vft3AWcRUyWW1vIBK0uZzs6GYshbQZB952S0yo4\nFzI1hABGHncH8UvuFauh4EZ8tY7/X5I0pGRnDOcRN1dAht5w5yTA+6r5kebiFQjP\nIzN/eCO/a9Flrj9YGW7HDNtjSOH0A31PLRGlJtJO3yK57dnf5ppyCZGfL4emShQo\ncQIDAQAB\n-----END PUBLIC KEY-----\n\n" +  }, +  "featured": "https://example.com/users/{{nickname}}/collections/featured", +  "summary": "your friendly neighborhood pleroma developer<br>I like cute things and distributed systems, and really hate delete and redrafts", +  "tag": [], +  "type": "Person", +  "url": "https://example.com/users/{{nickname}}" +} | 
