<% end %>
diff --git a/test/components/published_dates_test.rb b/test/components/published_dates_test.rb
index c14110e28..588e5aa7e 100644
--- a/test/components/published_dates_test.rb
+++ b/test/components/published_dates_test.rb
@@ -35,6 +35,16 @@ def component_name
assert_select ".app-c-published-dates--history .app-c-published-dates__change-date", text: "23 August 2013"
end
+ test "strips leading and trailing whitespace from note text" do
+ render_component(
+ published: "1st November 2000",
+ last_updated: "15th July 2015",
+ history: [display_time: "23 August 2013", note: "Updated with new data"],
+ )
+ assert_select ".app-c-published-dates__change-history#full-history"
+ assert_select ".app-c-published-dates--history .app-c-published-dates__change-note", text: /^\S/
+ end
+
test "only adds history id when passed page history" do
render_component(published: "1st November 2000")
assert_select "#history", false, "should only render history id if passed history item"