mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: New "First Onebox" badge
This commit is contained in:
@@ -17,6 +17,7 @@ describe PostAnalyzer do
|
||||
it 'fetches the cached onebox for any urls in the post' do
|
||||
Oneboxer.expects(:cached_onebox).with url
|
||||
post_analyzer.cook(*args)
|
||||
expect(post_analyzer.found_oneboxes?).to be(true)
|
||||
end
|
||||
|
||||
it 'does not invalidate the onebox cache' do
|
||||
@@ -153,6 +154,8 @@ describe PostAnalyzer do
|
||||
|
||||
it "finds links from HTML" do
|
||||
post_analyzer = PostAnalyzer.new(raw_post_two_links_html, default_topic_id)
|
||||
post_analyzer.cook(raw_post_two_links_html, {})
|
||||
expect(post_analyzer.found_oneboxes?).to be(false)
|
||||
expect(post_analyzer.link_count).to eq(2)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user