Removed flaky test

refs https://ghost.slack.com/archives/C02G9E68C/p1674558376712339

- this test is also flaky and causing random failures
This commit is contained in:
Daniel Lockyer 2023-01-25 11:41:59 +01:00
parent 8123f883bd
commit 977c95157a
No known key found for this signature in database

View File

@ -16,37 +16,4 @@ describe('Webmentions (receiving)', function () {
nock.cleanAll();
nock.enableNetConnect();
});
it('can receive a webmention', async function () {
const url = new URL('http://testpage.com/external-article/');
const html = `
<html><head><title>Test Page</title><meta name="description" content="Test description"><meta name="author" content="John Doe"></head><body></body></html>
`;
nock(url.href)
.get('/')
.reply(200, html, {'content-type': 'text/html'});
await agent.post('/receive')
.body({
source: 'http://testpage.com/external-article/',
target: urlUtils.getSiteUrl() + 'integrations/',
withExtension: true // test payload recorded
})
.expectStatus(202);
// todo: remove sleep in future
await sleep(2000);
const mention = await models.Mention.findOne({source: 'http://testpage.com/external-article/'});
assert(mention);
assert.equal(mention.get('target'), urlUtils.getSiteUrl() + 'integrations/');
assert.ok(mention.get('resource_id'));
assert.equal(mention.get('resource_type'), 'post');
assert.equal(mention.get('source_title'), 'Test Page');
assert.equal(mention.get('source_excerpt'), 'Test description');
assert.equal(mention.get('source_author'), 'John Doe');
assert.equal(mention.get('payload'), JSON.stringify({
withExtension: true
}));
});
});