From b640f35621b419ae9b9e621e00a8a055068ce2f4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 20 Mar 2016 13:03:06 +0100 Subject: Writing out more tests, fixed some bugs --- spec/fixtures/requests/.host-meta.txt | 19 ++ spec/fixtures/requests/avatar.txt | Bin 0 -> 109962 bytes spec/fixtures/requests/feed.txt | 440 ++++++++++++++++++++++++++++++++++ spec/fixtures/requests/webfinger.txt | 11 + 4 files changed, 470 insertions(+) create mode 100644 spec/fixtures/requests/.host-meta.txt create mode 100644 spec/fixtures/requests/avatar.txt create mode 100644 spec/fixtures/requests/feed.txt create mode 100644 spec/fixtures/requests/webfinger.txt (limited to 'spec/fixtures/requests') diff --git a/spec/fixtures/requests/.host-meta.txt b/spec/fixtures/requests/.host-meta.txt new file mode 100644 index 000000000..b312b11fb --- /dev/null +++ b/spec/fixtures/requests/.host-meta.txt @@ -0,0 +1,19 @@ +HTTP/1.1 200 OK +Server: nginx/1.6.2 +Date: Sun, 20 Mar 2016 11:11:00 GMT +Content-Type: application/xrd+xml +Transfer-Encoding: chunked +Connection: keep-alive +Access-Control-Allow-Origin: * +Vary: Accept-Encoding,Cookie +Strict-Transport-Security: max-age=31536000; includeSubdomains; + + + + + + + + + + diff --git a/spec/fixtures/requests/avatar.txt b/spec/fixtures/requests/avatar.txt new file mode 100644 index 000000000..d57b0984f Binary files /dev/null and b/spec/fixtures/requests/avatar.txt differ diff --git a/spec/fixtures/requests/feed.txt b/spec/fixtures/requests/feed.txt new file mode 100644 index 000000000..91eeb29bd --- /dev/null +++ b/spec/fixtures/requests/feed.txt @@ -0,0 +1,440 @@ +HTTP/1.1 200 OK +Server: nginx/1.6.2 +Date: Sun, 20 Mar 2016 11:15:03 GMT +Content-Type: application/atom+xml; charset=utf-8 +Transfer-Encoding: chunked +Connection: keep-alive +Access-Control-Allow-Origin: * +Vary: Accept-Encoding,Cookie +ETag: "ApiTimelineUser:0:en:7477:1458471931:1457967123" +Last-Modified: Sun, 20 Mar 2016 11:05:31 +0000 +Expires: Thu, 01 Jan 1970 00:00:00 GMT +Cache-Control: private, must-revalidate, max-age=0 +Pragma: +X-SUP-ID: https://quitter.no/main/sup +Strict-Transport-Security: max-age=31536000; includeSubdomains; + + + + GNU social + https://quitter.no/api/statuses/user_timeline/7477.atom + gargron timeline + Updates from gargron on Quitter.no! + https://quitter.no/avatar/7477-96-20160211190340.png + 2016-03-20T12:15:03+01:00 + + http://activitystrea.ms/schema/1.0/person + https://quitter.no/user/7477 + gargron + Software engineer, free time musician and DIGITAL SPORTS enthusiast. Likes cats. Warning: May contain memes + + + + + + gargron + DIGITAL CAT + Software engineer, free time musician and DIGITAL SPORTS enthusiast. Likes cats. Warning: May contain memes + + Germany + + + homepage + https://zeonfederated.com + true + + + + + + + + + + + + + + http://activitystrea.ms/schema/1.0/note + tag:quitter.no,2016-03-20:noticeId=1276923:objectType=note + New note by gargron + @<a href="https://cb6e6126.ngrok.io/users/catsrgr8" class="h-card mention">catsrgr8</a> this is a mention + + + http://activitystrea.ms/schema/1.0/post + 2016-03-20T11:05:31+00:00 + 2016-03-20T11:05:31+00:00 + + tag:quitter.no,2016-03-20:objectType=thread:nonce=7c998112e39a6685 + + + + + + + + http://activitystrea.ms/schema/1.0/note + tag:quitter.no,2016-03-19:noticeId=1273635:objectType=note + New note by gargron + Just testing a thing. + + + http://activitystrea.ms/schema/1.0/post + 2016-03-19T20:35:53+00:00 + 2016-03-19T20:35:53+00:00 + + tag:quitter.no,2016-03-19:objectType=thread:nonce=c4a61886d5cad4c2 + + + + + + + + tag:quitter.no,2016-03-19:noticeId=1272988:objectType=note + Delete + <a href="https://quitter.no/gargron">DIGITAL CAT</a> deleted notice <a href="https://quitter.no/notice/1272988">{{tag:quitter.no,2016-03-19:noticeId=1272988:objectType=note}}</a>. + + delete + 2016-03-19T18:16:58+00:00 + 2016-03-19T18:16:58+00:00 + + http://activitystrea.ms/schema/1.0/note + tag:quitter.no,2016-03-19:noticeId=1272988:objectType=note + + + tag:quitter.no,2016-03-19:objectType=thread:nonce=7913e6b6256b6d0b + + + http://activitystrea.ms/schema/1.0/note + tag:quitter.no,2016-03-19:noticeId=1272988:objectType=note + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-19:noticeId=1269381:objectType=comment + New comment by gargron + @<a href="https://mastodon.social/users/Gargron" class="h-card mention" title="Eugen">gargron</a> I have to wonder if this will appear as a reply to the right status, and not just a mention. + + + http://activitystrea.ms/schema/1.0/post + 2016-03-19T00:10:14+00:00 + 2016-03-19T00:10:14+00:00 + + + + tag:quitter.no,2016-03-18:objectType=thread:nonce=d05c6330fbe23fb9 + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-18:noticeId=1265337:objectType=comment + New comment by gargron + @<a href="https://community.highlandarrow.com/user/1" class="h-card mention" title="Maiyannah Bishop">maiyannah</a> Plus, Android can hardly be considered free software given how many proprietary blobs are used. I'm speaking as a disappointed Android user. + + + http://activitystrea.ms/schema/1.0/post + 2016-03-18T10:01:50+00:00 + 2016-03-18T10:01:50+00:00 + + + + tag:community.highlandarrow.com,2016-03-18:objectType=thread:nonce=d61438407b882959 + + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-18:noticeId=1265331:objectType=comment + New comment by gargron + @<a href="https://community.highlandarrow.com/user/1" class="h-card mention" title="Maiyannah Bishop">maiyannah</a> Well as it turns out, Apple software is better than Android in terms of security, and Apple is fighting FBI while Google promised to build a messaging app that facilitates wire tapping. The whole free software thing should imo be considered a bonus and not overshadow other factors. + + + http://activitystrea.ms/schema/1.0/post + 2016-03-18T10:01:01+00:00 + 2016-03-18T10:01:01+00:00 + + + + tag:community.highlandarrow.com,2016-03-18:objectType=thread:nonce=d61438407b882959 + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-17:noticeId=1261358:objectType=comment + New comment by gargron + @<a href="https://community.highlandarrow.com/user/1" class="h-card mention" title="Maiyannah Bishop">maiyannah</a> @<a href="https://gs.kawa-kun.com/user/2" class="h-card mention" title="&#x7AF9;&#x4E0B;&#x61B2;&#x4E8C;">takeshitakenji</a> There is a reason that was deprecated and we don't use tables to design websites anymore. HTML needs to be semantic, i.e. tags need to describe the *kind* of content, not how it should *look*, which is a responsibility delegated to CSS. There are so many upsides to this separation of concerns, should I start listing? + + + http://activitystrea.ms/schema/1.0/post + 2016-03-17T17:00:26+00:00 + 2016-03-17T17:00:26+00:00 + + + + tag:gs.kawa-kun.com,2016-03-17:objectType=thread:nonce=a83963573a0520f1 + + + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T21:24:13+01:00 + DIGITAL CAT (gargron)'s status on Wednesday, 16-Mar-2016 21:24:13 CET + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T20:24:13+00:00 + 2016-03-16T20:24:13+00:00 + + http://activitystrea.ms/schema/1.0/person + https://mastodon.social/users/Gargron + Eugen + Software engineer, free time musician and DIGITAL SPORTS enthusiast. Likes cats. Warning: May contain memes + + + + + + gargron + Eugen + Software engineer, free time musician and DIGITAL SPORTS enthusiast. Likes cats. Warning: May contain memes + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=073bda8223dfcaa7 + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T21:22:38+01:00 + + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T20:22:38+00:00 + 2016-03-16T20:22:38+00:00 + + http://activitystrea.ms/schema/1.0/person + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T21:22:38+01:00 + New person by gargron + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=b157f676181e0ecd + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T21:16:14+01:00 + + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T20:16:15+00:00 + 2016-03-16T20:16:15+00:00 + + http://activitystrea.ms/schema/1.0/person + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T21:16:14+01:00 + New person by gargron + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=6a6ebd1ed6504a11 + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15750:2016-03-16T21:13:06+01:00 + + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://acda7931.ngrok.io/users/catsrgr8">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T20:13:06+00:00 + 2016-03-16T20:13:06+00:00 + + http://activitystrea.ms/schema/1.0/person + tag:quitter.no,2016-03-16:subscription:7477:person:15750:2016-03-16T21:13:06+01:00 + New person by gargron + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://acda7931.ngrok.io/users/catsrgr8">Eugen</a>. + + + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=8f5f92443584e8f0 + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15750:2016-03-16T21:05:02+01:00 + + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://acda7931.ngrok.io/users/catsrgr8">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T20:05:03+00:00 + 2016-03-16T20:05:03+00:00 + + http://activitystrea.ms/schema/1.0/person + tag:quitter.no,2016-03-16:subscription:7477:person:15750:2016-03-16T21:05:02+01:00 + New person by gargron + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://acda7931.ngrok.io/users/catsrgr8">Eugen</a>. + + + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=b630d235232fcff5 + + + + + + + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T19:04:16+01:00 + + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + http://activitystrea.ms/schema/1.0/follow + 2016-03-16T18:04:16+00:00 + 2016-03-16T18:04:16+00:00 + + http://activitystrea.ms/schema/1.0/person + tag:quitter.no,2016-03-16:subscription:7477:person:15743:2016-03-16T19:04:16+01:00 + New person by gargron + <a href="https://quitter.no/gargron">DIGITAL CAT</a> started following <a href="https://mastodon.social/users/Gargron">Eugen</a>. + + + + + tag:quitter.no,2016-03-16:objectType=thread:nonce=40eb98e5f85c9908 + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-15:noticeId=1251422:objectType=comment + New comment by gargron + @<a href="https://community.highlandarrow.com/user/1" class="h-card mention" title="Maiyannah Bishop">maiyannah</a> LGB, not LGBT? + + + http://activitystrea.ms/schema/1.0/post + 2016-03-15T20:28:13+00:00 + 2016-03-15T20:28:13+00:00 + + + + tag:community.highlandarrow.com,2016-03-15:objectType=thread:nonce=70ff6886d69e5225 + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-15:noticeId=1250742:objectType=comment + New comment by gargron + @<a href="https://social.umeahackerspace.se/user/2" class="h-card mention" title="&lt;Mikael &amp; Nordfeldth&gt;">mmn</a> I'm like reeeeally close to actually deploying the first production instance of Mastodon, but it bugs me that there's gonna be that issue with avatars and profiles not updating :( + + + http://activitystrea.ms/schema/1.0/post + 2016-03-15T18:44:54+00:00 + 2016-03-15T18:44:54+00:00 + + + + tag:quitter.no,2016-03-15:objectType=thread:nonce=2fbd771270b5da80 + + + + + + + + http://activitystrea.ms/schema/1.0/note + tag:quitter.no,2016-03-15:noticeId=1250653:objectType=note + New note by gargron + @<a href="https://social.umeahackerspace.se/user/2" class="h-card mention" title="&lt;Mikael &amp; Nordfeldth&gt;">mmn</a> Any progress on the issues I created? + + + http://activitystrea.ms/schema/1.0/post + 2016-03-15T18:27:00+00:00 + 2016-03-15T18:27:00+00:00 + + tag:quitter.no,2016-03-15:objectType=thread:nonce=2fbd771270b5da80 + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-14:noticeId=1243566:objectType=comment + New comment by gargron + @<a href="https://community.highlandarrow.com/user/1" class="h-card mention" title="Maiyannah Bishop">maiyannah</a> I heard Piwik is also good. + + + http://activitystrea.ms/schema/1.0/post + 2016-03-14T15:35:23+00:00 + 2016-03-14T15:35:23+00:00 + + + + tag:community.highlandarrow.com,2016-03-14:objectType=thread:nonce=8fbf00e7f76866d3 + + + + + + + + http://activitystrea.ms/schema/1.0/comment + tag:quitter.no,2016-03-14:noticeId=1243331:objectType=comment + New comment by gargron + I do wish I had somebody else partake in the development process if only to give me feedback on my decisions + + + http://activitystrea.ms/schema/1.0/post + 2016-03-14T14:52:03+00:00 + 2016-03-14T14:52:03+00:00 + + + + tag:quitter.no,2016-03-14:objectType=thread:nonce=46e8a2abc1839d01 + + + + + + + diff --git a/spec/fixtures/requests/webfinger.txt b/spec/fixtures/requests/webfinger.txt new file mode 100644 index 000000000..edb8a2dbb --- /dev/null +++ b/spec/fixtures/requests/webfinger.txt @@ -0,0 +1,11 @@ +HTTP/1.1 200 OK +Server: nginx/1.6.2 +Date: Sun, 20 Mar 2016 11:13:16 GMT +Content-Type: application/jrd+json +Transfer-Encoding: chunked +Connection: keep-alive +Access-Control-Allow-Origin: * +Vary: Accept-Encoding,Cookie +Strict-Transport-Security: max-age=31536000; includeSubdomains; + +{"subject":"acct:gargron@quitter.no","aliases":["https:\/\/quitter.no\/user\/7477","https:\/\/quitter.no\/gargron","https:\/\/quitter.no\/index.php\/user\/7477","https:\/\/quitter.no\/index.php\/gargron"],"links":[{"rel":"http:\/\/webfinger.net\/rel\/profile-page","type":"text\/html","href":"https:\/\/quitter.no\/gargron"},{"rel":"http:\/\/gmpg.org\/xfn\/11","type":"text\/html","href":"https:\/\/quitter.no\/gargron"},{"rel":"describedby","type":"application\/rdf+xml","href":"https:\/\/quitter.no\/gargron\/foaf"},{"rel":"http:\/\/apinamespace.org\/atom","type":"application\/atomsvc+xml","href":"https:\/\/quitter.no\/api\/statusnet\/app\/service\/gargron.xml"},{"rel":"http:\/\/apinamespace.org\/twitter","href":"https:\/\/quitter.no\/api\/"},{"rel":"http:\/\/specs.openid.net\/auth\/2.0\/provider","href":"https:\/\/quitter.no\/gargron"},{"rel":"http:\/\/schemas.google.com\/g\/2010#updates-from","type":"application\/atom+xml","href":"https:\/\/quitter.no\/api\/statuses\/user_timeline\/7477.atom"},{"rel":"magic-public-key","href":"data:application\/magic-public-key,RSA.1ZBkHTavLvxH3FzlKv4O6WtlILKRFfNami3_Rcu8EuogtXSYiS-bB6hElZfUCSHbC4uLemOA34PEhz__CDMozax1iI_t8dzjDnh1x0iFSup7pSfW9iXk_WU3Dm74yWWW2jildY41vWgrEstuQ1dJ8vVFfSJ9T_tO4c-T9y8vDI8=.AQAB"},{"rel":"salmon","href":"https:\/\/quitter.no\/main\/salmon\/user\/7477"},{"rel":"http:\/\/salmon-protocol.org\/ns\/salmon-replies","href":"https:\/\/quitter.no\/main\/salmon\/user\/7477"},{"rel":"http:\/\/salmon-protocol.org\/ns\/salmon-mention","href":"https:\/\/quitter.no\/main\/salmon\/user\/7477"},{"rel":"http:\/\/ostatus.org\/schema\/1.0\/subscribe","template":"https:\/\/quitter.no\/main\/ostatussub?profile={uri}"}]} \ No newline at end of file -- cgit