Skip to content

Commit

Permalink
Stop request to instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
notnownikki committed Apr 18, 2019
1 parent 764209b commit 82a5ecc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/e2e-tests/specs/embedding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
clickBlockAppender,
createNewPost,
createEmbeddingMatcher,
createURLMatcher,
setUpResponseMocking,
createJSONResponse,
getEditedPostContent,
Expand Down Expand Up @@ -124,6 +125,12 @@ const MOCK_RESPONSES = [
match: createEmbeddingMatcher( 'https://twitter.com/wooyaygutenberg123454312' ),
onRequestMatch: createJSONResponse( MOCK_CANT_EMBED_RESPONSE ),
},
// Respond to the instagram URL with a non-image response, doesn't matter what it is,
// just make sure the image errors.
{
match: createURLMatcher( 'https://www.instagram.com/p/Bvl97o2AK6x/' ),
onRequestMatch: createJSONResponse( MOCK_CANT_EMBED_RESPONSE ),
},
];

const addAllEmbeds = async () => {
Expand Down

0 comments on commit 82a5ecc

Please sign in to comment.