summaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/httpoison_mock/emelie.json1
-rw-r--r--test/fixtures/httpoison_mock/rinpatch.json64
-rw-r--r--test/fixtures/mastodon-question-activity.json99
-rw-r--r--test/fixtures/mastodon-vote.json16
-rw-r--r--test/fixtures/rich_media/ogp-missing-data.html8
-rw-r--r--test/fixtures/rich_media/ogp.html1
6 files changed, 189 insertions, 0 deletions
diff --git a/test/fixtures/httpoison_mock/emelie.json b/test/fixtures/httpoison_mock/emelie.json
new file mode 100644
index 000000000..592fc0e4e
--- /dev/null
+++ b/test/fixtures/httpoison_mock/emelie.json
@@ -0,0 +1 @@
+{"@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","Hashtag":"as:Hashtag","Emoji":"toot:Emoji","IdentityProof":"toot:IdentityProof","focalPoint":{"@container":"@list","@id":"toot:focalPoint"}}],"id":"https://mastodon.social/users/emelie","type":"Person","following":"https://mastodon.social/users/emelie/following","followers":"https://mastodon.social/users/emelie/followers","inbox":"https://mastodon.social/users/emelie/inbox","outbox":"https://mastodon.social/users/emelie/outbox","featured":"https://mastodon.social/users/emelie/collections/featured","preferredUsername":"emelie","name":"emelie 🎨","summary":"\u003cp\u003e23 / \u003ca href=\"https://mastodon.social/tags/sweden\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003eSweden\u003c/span\u003e\u003c/a\u003e / \u003ca href=\"https://mastodon.social/tags/artist\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003eArtist\u003c/span\u003e\u003c/a\u003e / \u003ca href=\"https://mastodon.social/tags/equestrian\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003eEquestrian\u003c/span\u003e\u003c/a\u003e / \u003ca href=\"https://mastodon.social/tags/gamedev\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003eGameDev\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003eIf I ain\u0026apos;t spending time with my pets, I\u0026apos;m probably drawing. 🐴 🐱 🐰\u003c/p\u003e","url":"https://mastodon.social/@emelie","manuallyApprovesFollowers":false,"publicKey":{"id":"https://mastodon.social/users/emelie#main-key","owner":"https://mastodon.social/users/emelie","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu3CWs1oAJPE3ZJ9sj6Ut\n/Mu+mTE7MOijsQc8/6c73XVVuhIEomiozJIH7l8a7S1n5SYL4UuiwcubSOi7u1bb\nGpYnp5TYhN+Cxvq/P80V4/ncNIPSQzS49it7nSLeG5pA21lGPDA44huquES1un6p\n9gSmbTwngVX9oe4MYuUeh0Z7vijjU13Llz1cRq/ZgPQPgfz+2NJf+VeXnvyDZDYx\nZPVBBlrMl3VoGbu0M5L8SjY35559KCZ3woIvqRolcoHXfgvJMdPcJgSZVYxlCw3d\nA95q9jQcn6s87CPSUs7bmYEQCrDVn5m5NER5TzwBmP4cgJl9AaDVWQtRd4jFZNTx\nlQIDAQAB\n-----END PUBLIC KEY-----\n"},"tag":[{"type":"Hashtag","href":"https://mastodon.social/explore/sweden","name":"#sweden"},{"type":"Hashtag","href":"https://mastodon.social/explore/gamedev","name":"#gamedev"},{"type":"Hashtag","href":"https://mastodon.social/explore/artist","name":"#artist"},{"type":"Hashtag","href":"https://mastodon.social/explore/equestrian","name":"#equestrian"}],"attachment":[{"type":"PropertyValue","name":"Ko-fi","value":"\u003ca href=\"https://ko-fi.com/emeliepng\" rel=\"me nofollow noopener\" target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://\u003c/span\u003e\u003cspan class=\"\"\u003eko-fi.com/emeliepng\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e"},{"type":"PropertyValue","name":"Instagram","value":"\u003ca href=\"https://www.instagram.com/emelie_png/\" rel=\"me nofollow noopener\" target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://www.\u003c/span\u003e\u003cspan class=\"\"\u003einstagram.com/emelie_png/\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e"},{"type":"PropertyValue","name":"Carrd","value":"\u003ca href=\"https://emelie.carrd.co/\" rel=\"me nofollow noopener\" target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://\u003c/span\u003e\u003cspan class=\"\"\u003eemelie.carrd.co/\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e"},{"type":"PropertyValue","name":"Artstation","value":"\u003ca href=\"https://emiri.artstation.com\" rel=\"me nofollow noopener\" target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://\u003c/span\u003e\u003cspan class=\"\"\u003eemiri.artstation.com\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e"}],"endpoints":{"sharedInbox":"https://mastodon.social/inbox"},"icon":{"type":"Image","mediaType":"image/png","url":"https://files.mastodon.social/accounts/avatars/000/015/657/original/e7163f98280da1a4.png"},"image":{"type":"Image","mediaType":"image/png","url":"https://files.mastodon.social/accounts/headers/000/015/657/original/847f331f3dd9e38b.png"}} \ No newline at end of file
diff --git a/test/fixtures/httpoison_mock/rinpatch.json b/test/fixtures/httpoison_mock/rinpatch.json
new file mode 100644
index 000000000..59311ecb6
--- /dev/null
+++ b/test/fixtures/httpoison_mock/rinpatch.json
@@ -0,0 +1,64 @@
+{
+ "@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",
+ "Hashtag": "as:Hashtag",
+ "Emoji": "toot:Emoji",
+ "IdentityProof": "toot:IdentityProof",
+ "focalPoint": {
+ "@container": "@list",
+ "@id": "toot:focalPoint"
+ }
+ }
+ ],
+ "id": "https://mastodon.sdf.org/users/rinpatch",
+ "type": "Person",
+ "following": "https://mastodon.sdf.org/users/rinpatch/following",
+ "followers": "https://mastodon.sdf.org/users/rinpatch/followers",
+ "inbox": "https://mastodon.sdf.org/users/rinpatch/inbox",
+ "outbox": "https://mastodon.sdf.org/users/rinpatch/outbox",
+ "featured": "https://mastodon.sdf.org/users/rinpatch/collections/featured",
+ "preferredUsername": "rinpatch",
+ "name": "rinpatch",
+ "summary": "<p>umu</p>",
+ "url": "https://mastodon.sdf.org/@rinpatch",
+ "manuallyApprovesFollowers": false,
+ "publicKey": {
+ "id": "https://mastodon.sdf.org/users/rinpatch#main-key",
+ "owner": "https://mastodon.sdf.org/users/rinpatch",
+ "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1vbhYKDopb5xzfJB2TZY\n0ZvgxqdAhbSKKkQC5Q2b0ofhvueDy2AuZTnVk1/BbHNlqKlwhJUSpA6LiTZVvtcc\nMn6cmSaJJEg30gRF5GARP8FMcuq8e2jmceiW99NnUX17MQXsddSf2JFUwD0rUE8H\nBsgD7UzE9+zlA/PJOTBO7fvBEz9PTQ3r4sRMTJVFvKz2MU/U+aRNTuexRKMMPnUw\nfp6VWh1F44VWJEQOs4tOEjGiQiMQh5OfBk1w2haT3vrDbQvq23tNpUP1cRomLUtx\nEBcGKi5DMMBzE1RTVT1YUykR/zLWlA+JSmw7P6cWtsHYZovs8dgn8Po3X//6N+ng\nTQIDAQAB\n-----END PUBLIC KEY-----\n"
+ },
+ "tag": [],
+ "attachment": [],
+ "endpoints": {
+ "sharedInbox": "https://mastodon.sdf.org/inbox"
+ },
+ "icon": {
+ "type": "Image",
+ "mediaType": "image/jpeg",
+ "url": "https://mastodon.sdf.org/system/accounts/avatars/000/067/580/original/bf05521bf711b7a0.jpg?1533238802"
+ },
+ "image": {
+ "type": "Image",
+ "mediaType": "image/gif",
+ "url": "https://mastodon.sdf.org/system/accounts/headers/000/067/580/original/a99b987e798f7063.gif?1533278217"
+ }
+}
diff --git a/test/fixtures/mastodon-question-activity.json b/test/fixtures/mastodon-question-activity.json
new file mode 100644
index 000000000..ac329c7d5
--- /dev/null
+++ b/test/fixtures/mastodon-question-activity.json
@@ -0,0 +1,99 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ {
+ "ostatus": "http://ostatus.org#",
+ "atomUri": "ostatus:atomUri",
+ "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
+ "conversation": "ostatus:conversation",
+ "sensitive": "as:sensitive",
+ "Hashtag": "as:Hashtag",
+ "toot": "http://joinmastodon.org/ns#",
+ "Emoji": "toot:Emoji",
+ "focalPoint": {
+ "@container": "@list",
+ "@id": "toot:focalPoint"
+ }
+ }
+ ],
+ "id": "https://mastodon.sdf.org/users/rinpatch/statuses/102070944809637304/activity",
+ "type": "Create",
+ "actor": "https://mastodon.sdf.org/users/rinpatch",
+ "published": "2019-05-10T09:03:36Z",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://mastodon.sdf.org/users/rinpatch/followers"
+ ],
+ "object": {
+ "id": "https://mastodon.sdf.org/users/rinpatch/statuses/102070944809637304",
+ "type": "Question",
+ "summary": null,
+ "inReplyTo": null,
+ "published": "2019-05-10T09:03:36Z",
+ "url": "https://mastodon.sdf.org/@rinpatch/102070944809637304",
+ "attributedTo": "https://mastodon.sdf.org/users/rinpatch",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://mastodon.sdf.org/users/rinpatch/followers"
+ ],
+ "sensitive": false,
+ "atomUri": "https://mastodon.sdf.org/users/rinpatch/statuses/102070944809637304",
+ "inReplyToAtomUri": null,
+ "conversation": "tag:mastodon.sdf.org,2019-05-10:objectId=15095122:objectType=Conversation",
+ "content": "<p>Why is Tenshi eating a corndog so cute?</p>",
+ "contentMap": {
+ "en": "<p>Why is Tenshi eating a corndog so cute?</p>"
+ },
+ "endTime": "2019-05-11T09:03:36Z",
+ "closed": "2019-05-11T09:03:36Z",
+ "attachment": [],
+ "tag": [],
+ "replies": {
+ "id": "https://mastodon.sdf.org/users/rinpatch/statuses/102070944809637304/replies",
+ "type": "Collection",
+ "first": {
+ "type": "CollectionPage",
+ "partOf": "https://mastodon.sdf.org/users/rinpatch/statuses/102070944809637304/replies",
+ "items": []
+ }
+ },
+ "oneOf": [
+ {
+ "type": "Note",
+ "name": "Dunno",
+ "replies": {
+ "type": "Collection",
+ "totalItems": 0
+ }
+ },
+ {
+ "type": "Note",
+ "name": "Everyone knows that!",
+ "replies": {
+ "type": "Collection",
+ "totalItems": 1
+ }
+ },
+ {
+ "type": "Note",
+ "name": "25 char limit is dumb",
+ "replies": {
+ "type": "Collection",
+ "totalItems": 0
+ }
+ },
+ {
+ "type": "Note",
+ "name": "I can't even fit a funny",
+ "replies": {
+ "type": "Collection",
+ "totalItems": 1
+ }
+ }
+ ]
+ }
+}
diff --git a/test/fixtures/mastodon-vote.json b/test/fixtures/mastodon-vote.json
new file mode 100644
index 000000000..c2c5f40c0
--- /dev/null
+++ b/test/fixtures/mastodon-vote.json
@@ -0,0 +1,16 @@
+{
+ "@context": "https://www.w3.org/ns/activitystreams",
+ "actor": "https://mastodon.sdf.org/users/rinpatch",
+ "id": "https://mastodon.sdf.org/users/rinpatch#votes/387/activity",
+ "nickname": "rin",
+ "object": {
+ "attributedTo": "https://mastodon.sdf.org/users/rinpatch",
+ "id": "https://mastodon.sdf.org/users/rinpatch#votes/387",
+ "inReplyTo": "https://testing.uguu.ltd/objects/9d300947-2dcb-445d-8978-9a3b4b84fa14",
+ "name": "suya..",
+ "to": "https://testing.uguu.ltd/users/rin",
+ "type": "Note"
+ },
+ "to": "https://testing.uguu.ltd/users/rin",
+ "type": "Create"
+}
diff --git a/test/fixtures/rich_media/ogp-missing-data.html b/test/fixtures/rich_media/ogp-missing-data.html
new file mode 100644
index 000000000..5746dc2f4
--- /dev/null
+++ b/test/fixtures/rich_media/ogp-missing-data.html
@@ -0,0 +1,8 @@
+<html prefix="og: http://ogp.me/ns#">
+ <head>
+ <title>Pleroma</title>
+ <meta property="og:title" content="Pleroma" />
+ <meta property="og:type" content="website" />
+ <meta property="og:url" content="https://pleroma.social/" />
+ </head>
+</html>
diff --git a/test/fixtures/rich_media/ogp.html b/test/fixtures/rich_media/ogp.html
index c886b5871..4b5a33595 100644
--- a/test/fixtures/rich_media/ogp.html
+++ b/test/fixtures/rich_media/ogp.html
@@ -5,5 +5,6 @@
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
+ <meta property="og:description" content="Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.">
</head>
</html>