- date = Time.new(2014, 3, 5, 21, 37, 45, "+00:00")
+ date = Time.utc(2014, 3, 5, 21, 37, 45)
+ user = create(:user)
+
+ note_event_dom = Rails::Dom::Testing.html_document_fragment.parse "<div>#{note_event('opened', date, nil)}</div>"
+ assert_dom note_event_dom, ":root", :text => /^Created by anonymous .* ago$/ do
+ assert_dom "> a", :count => 0
+ assert_dom "> time", :count => 1 do
+ assert_dom "> @title", "5 March 2014 at 21:37"
+ assert_dom "> @datetime", "2014-03-05T21:37:45Z"
+ end
+ end