]> git.openstreetmap.org Git - rails.git/blobdiff - test/helpers/changeset_helper_test.rb
Merge remote-tracking branch 'openstreetmap/pull/1120'
[rails.git] / test / helpers / changeset_helper_test.rb
index 3fa5d266da465288978a573f1165efa1fc7a8f3b..8342f99d251693eefbc7ba6e58fda0d9c7b8224f 100644 (file)
@@ -1,4 +1,4 @@
-require 'test_helper'
+require "test_helper"
 
 class ChangesetHelperTest < ActionView::TestCase
   fixtures :changesets, :users
 
 class ChangesetHelperTest < ActionView::TestCase
   fixtures :changesets, :users
@@ -6,10 +6,11 @@ class ChangesetHelperTest < ActionView::TestCase
   def test_changeset_user_link
     assert_equal "<a href=\"/user/test2\">test2</a>", changeset_user_link(changesets(:public_user_first_change))
     assert_equal "anonymous", changeset_user_link(changesets(:normal_user_first_change))
   def test_changeset_user_link
     assert_equal "<a href=\"/user/test2\">test2</a>", changeset_user_link(changesets(:public_user_first_change))
     assert_equal "anonymous", changeset_user_link(changesets(:normal_user_first_change))
+    assert_equal "deleted", changeset_user_link(changesets(:deleted_user_first_change))
   end
 
   def test_changeset_details
   end
 
   def test_changeset_details
-    assert_match /^Created <abbr title='Mon, 01 Jan 2007 00:00:00 \+0000'>.*<\/abbr> by anonymous$/, changeset_details(changesets(:normal_user_first_change))
-    assert_match /^Closed <abbr title='Created: Mon, 01 Jan 2007 00:00:00 \+0000&#10;Closed: Tue, 02 Jan 2007 00:00:00 \+0000'>.*<\/abbr> by <a href="\/user\/test2">test2<\/a>$/, changeset_details(changesets(:public_user_closed_change))
+    assert_match %r{^Created <abbr title='Mon, 01 Jan 2007 00:00:00 \+0000'>.*</abbr> by anonymous$}, changeset_details(changesets(:normal_user_first_change))
+    assert_match %r{^Closed <abbr title='Created: Mon, 01 Jan 2007 00:00:00 \+0000&#10;Closed: Tue, 02 Jan 2007 00:00:00 \+0000'>.*</abbr> by <a href="/user/test2">test2</a>$}, changeset_details(changesets(:public_user_closed_change))
   end
 end
   end
 end