Skip to content

Commit

Permalink
add failed attempt to integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vasconsaurus committed Sep 13, 2023
1 parent 513447a commit 4053994
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/integration/parsers/facebook_item_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,25 @@ class FacebookItemIntegrationTest < ActiveSupport::TestCase
assert !data['picture'].blank?
assert !data['subtype'].blank?
assert !data['published_at'].blank?
assert !data['html'].blank?
end

test "should return data even if post does not exist" do
m = create_media url: 'https://www.facebook.com/111111111111111/posts/1111111111111111'
data = m.as_json

assert_equal 'facebook', data['provider']
assert_equal 'item', data['type']
assert_equal '111111111111111_1111111111111111', data['external_id']
assert_equal 'https://www.facebook.com/111111111111111/posts/1111111111111111', data['title']
assert !data['raw']['crowdtangle']['error'].blank?
assert_equal '', data['username']
assert_equal '', data['author_name']
assert_equal '', data['author_picture']
assert_equal '', data['author_url']
assert_equal '', data['description']
assert_equal '', data['picture']
assert_equal '', data['published_at']
assert !data['html'].blank?
end
end

0 comments on commit 4053994

Please sign in to comment.