Ghost/ghost/webmentions/test
Fabien "egg" O'Carroll 90b7a3f4d0 Added verified member and verify method to Mention entity
closes https://github.com/TryGhost/Team/issues/2548

Rather than use a setter here we've used a verify method which takes the HTML
string and naively validates that the target URL is present. This is so that the
logic of verification is encapsulated in the Mention, and should mean that
erroneous verification doesn't happen.

We could consider down the line that the verify method fetches the content
itself, but if we're to do that we should pass in `got` as a param, so that it's
possible to stub in tests.

One thing to think about when it comes time to making this as performant as
possible is doing a single fetch of the source document and using that for
verification and metadata extraction. At that point we should probably
consolidate both of those operations, either moving the metadata extraction into
the Mention entity (passing in any necessary deps) OR we move the verification
out to the same layer as metadata extraction.
2023-02-13 19:23:34 +07:00
..
utils Added MentionSendingService (#16151) 2023-01-19 17:35:10 +01:00
.eslintrc.js Added webmentions package (#16133) 2023-01-17 13:18:16 +08:00
InMemoryMentionRepository.test.js Added support for deleting mentions (#16238) 2023-02-09 17:29:13 +07:00
Mention.test.js Added verified member and verify method to Mention entity 2023-02-13 19:23:34 +07:00
MentionDiscoveryService.test.js completely blocked external requests in Webmentions tests (#16186) 2023-01-25 10:43:57 -06:00
MentionsAPI.test.js Added support for deleting mentions (#16238) 2023-02-09 17:29:13 +07:00
MentionSendingService.test.js moved sending mentions to job (#16234) 2023-02-08 16:29:12 -06:00