X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7e8fd5d7b7874b60b977c3a190094a93e1e3ff85..c7da54d9591a0440a1f1c480a6783061817bd0e2:/test/helpers/user_blocks_helper_test.rb diff --git a/test/helpers/user_blocks_helper_test.rb b/test/helpers/user_blocks_helper_test.rb index 28cc0ad50..d308f46ea 100644 --- a/test/helpers/user_blocks_helper_test.rb +++ b/test/helpers/user_blocks_helper_test.rb @@ -58,7 +58,16 @@ class UserBlocksHelperTest < ActionView::TestCase block.update(:needs_view => false, :deactivates_at => Time.now.utc) - assert_match "read at", block_short_status(block) + read_date = Time.now.utc.to_date.strftime + short_status_dom = Rails::Dom::Testing.html_document.parse(block_short_status(block)) + assert_dom short_status_dom, ":root", :text => "read at #{read_date}" + + travel 24.hours + + block.update(:reason => "updated reason") + + short_status_dom = Rails::Dom::Testing.html_document.parse(block_short_status(block)) + assert_dom short_status_dom, ":root", :text => "read at #{read_date}" end end