X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/68abf2075b9efc652e19adeac2bbee9add99e455..69abc1310245adab250083aafc015a716a884a93:/test/controllers/diary_entries_controller_test.rb diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index e98342e10..7d543250b 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -648,6 +648,17 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest end end + def test_show_og_title + user = create(:user) + diary_entry = create(:diary_entry, :user => user, :title => "The Important Blog Post") + + get diary_entry_path(user, diary_entry) + assert_response :success + assert_dom "head meta[property='og:title']" do + assert_dom "> @content", "The Important Blog Post" + end + end + def test_show_og_image_with_no_image user = create(:user) diary_entry = create(:diary_entry, :user => user, :body => "nothing") @@ -766,6 +777,17 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest end end + def test_show_article_published_time + user = create(:user) + diary_entry = create(:diary_entry, :user => user, :created_at => "2020-03-04") + + get diary_entry_path(user, diary_entry) + assert_response :success + assert_dom "head meta[property='article:published_time']" do + assert_dom "> @content", "2020-03-04T00:00:00Z" + end + end + def test_hide user = create(:user) diary_entry = create(:diary_entry, :user => user)