X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ffda8d7ac5ca4f40a1211225dd3e1c898fc232a8..a73e20cd5c71afbc7405923b165d3f698a9b6897:/test/controllers/diary_entries_controller_test.rb?ds=inline 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)