Add stubs for remaining webmention types
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
#
|
||||
|
||||
RSpec.describe Adamantium::WebmentionRequestParser do
|
||||
include Dry::Monads[:result]
|
||||
subject { described_class.new }
|
||||
@@ -39,4 +39,3 @@ RSpec.describe Adamantium::WebmentionRequestParser do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -7,22 +7,22 @@ RSpec.describe "Webmention creation", :db, :requests do
|
||||
context "reply" do
|
||||
let(:reply_json) {
|
||||
{
|
||||
"type": "entry",
|
||||
"author": {
|
||||
"type": "card",
|
||||
"name": "nitza",
|
||||
"photo": "",
|
||||
"url": "https://micro.blog/nitza"
|
||||
type: "entry",
|
||||
author: {
|
||||
type: "card",
|
||||
name: "nitza",
|
||||
photo: "",
|
||||
url: "https://micro.blog/nitza"
|
||||
},
|
||||
"url": "https://micro.blog/nitza/20554783",
|
||||
"published": "2023-07-05T09:44:41+00:00",
|
||||
url: "https://micro.blog/nitza/20554783",
|
||||
published: "2023-07-05T09:44:41+00:00",
|
||||
"wm-received": "2023-07-05T09:44:48Z",
|
||||
"wm-id": 1692950,
|
||||
"wm-source": "https://micro.blog/nitza/20554783",
|
||||
"wm-target": "https://dnitza.com/post/#{post_record.slug}",
|
||||
"content": {
|
||||
"html": "<p><a href=\"https://micro.blog/example\">@example</a> hah! I thought the same thing — but this is the most affordable thing that Teenage Engineering makes 😅</p>",
|
||||
"text": "@example hah! I thought the same thing — but this is the most affordable thing that Teenage Engineering makes 😅"
|
||||
content: {
|
||||
html: "<p><a href=\"https://micro.blog/example\">@example</a> hah! I thought the same thing — but this is the most affordable thing that Teenage Engineering makes 😅</p>",
|
||||
text: "@example hah! I thought the same thing — but this is the most affordable thing that Teenage Engineering makes 😅"
|
||||
},
|
||||
"in-reply-to": "https://dnitza.com/post/#{post_record.slug}",
|
||||
"wm-property": "in-reply-to",
|
||||
@@ -38,4 +38,4 @@ RSpec.describe "Webmention creation", :db, :requests do
|
||||
expect(last_response).to be_successful
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user