]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Merge remote-tracking branch 'upstream/pull/5307'
[rails.git] / test / controllers / diary_entries_controller_test.rb
index aad759b5b68e3ebae15e20e60df50b27cf30814f..7d543250bc88a17b565cc72d99196d3f4b48a16d 100644 (file)
@@ -648,6 +648,17 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     end
   end
 
     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")
   def test_show_og_image_with_no_image
     user = create(:user)
     diary_entry = create(:diary_entry, :user => user, :body => "nothing")