Fix style issues found by new rubocop version
This commit is contained in:
parent
52d7cae438
commit
2af0840ff3
26 changed files with 64 additions and 59 deletions
|
@ -168,19 +168,19 @@ class ApplicationHelperTest < ActionView::TestCase
|
|||
|
||||
def test_friendly_date
|
||||
date = friendly_date(Time.new(2014, 3, 5, 18, 58, 23))
|
||||
assert_match /^<span title=" *5 March 2014 at 18:58">.*<\/span>$/, date
|
||||
assert_match %r{^<span title=" *5 March 2014 at 18:58">.*</span>$}, date
|
||||
|
||||
date = friendly_date(Time.now - 1.hour)
|
||||
assert_match /^<span title=".*">about 1 hour<\/span>$/, date
|
||||
assert_match %r{^<span title=".*">about 1 hour</span>$}, date
|
||||
|
||||
date = friendly_date(Time.now - 2.days)
|
||||
assert_match /^<span title=".*">2 days<\/span>$/, date
|
||||
assert_match %r{^<span title=".*">2 days</span>$}, date
|
||||
|
||||
date = friendly_date(Time.now - 3.weeks)
|
||||
assert_match /^<span title=".*">21 days<\/span>$/, date
|
||||
assert_match %r{^<span title=".*">21 days</span>$}, date
|
||||
|
||||
date = friendly_date(Time.now - 4.months)
|
||||
assert_match /^<span title=".*">4 months<\/span>$/, date
|
||||
assert_match %r{^<span title=".*">4 months</span>$}, date
|
||||
end
|
||||
|
||||
def test_body_class
|
||||
|
|
|
@ -9,7 +9,7 @@ class ChangesetHelperTest < ActionView::TestCase
|
|||
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 %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 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue