X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e3c43e4a1a2e9ebec5bc163b689671d05311051f..a73e20cd5c71afbc7405923b165d3f698a9b6897:/test/controllers/diary_entries_controller_test.rb?ds=sidebyside diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index d13a50163..765391d24 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -752,6 +752,17 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest end end + def test_show_og_image + user = create(:user) + diary_entry = create(:diary_entry, :user => user, :body => "![some picture](https://example.com/picture.jpg)") + + get diary_entry_path(user, diary_entry) + assert_response :success + assert_dom "head meta[property='og:image']" do + assert_dom "> @content", "https://example.com/picture.jpg" + end + end + def test_hide user = create(:user) diary_entry = create(:diary_entry, :user => user)