require "test_helper" class ChangesetHelperTest < ActionView::TestCase fixtures :changesets, :users def test_changeset_user_link assert_equal "test2", changeset_user_link(changesets(:public_user_first_change)) assert_equal "anonymous", changeset_user_link(changesets(:normal_user_first_change)) end def test_changeset_details assert_match %r{^Created .* by anonymous$}, changeset_details(changesets(:normal_user_first_change)) assert_match %r{^Closed .* by test2$}, changeset_details(changesets(:public_user_closed_change)) end end