Commit 2adc3c358184763e34911f55a8773c23100e0d50

Authored by Antonio Terceiro
1 parent 67a7c282

ActionItem918: fixing test that fails on etch

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
test/unit/content_viewer_helper_test.rb
@@ -4,6 +4,7 @@ class ContentViewerHelperTest < Test::Unit::TestCase @@ -4,6 +4,7 @@ class ContentViewerHelperTest < Test::Unit::TestCase
4 4
5 include ActionView::Helpers::TagHelper 5 include ActionView::Helpers::TagHelper
6 include ContentViewerHelper 6 include ContentViewerHelper
  7 + include DatesHelper
7 8
8 def setup 9 def setup
9 @profile = create_user('blog_helper_test').person 10 @profile = create_user('blog_helper_test').person
@@ -14,13 +15,13 @@ class ContentViewerHelperTest < Test::Unit::TestCase @@ -14,13 +15,13 @@ class ContentViewerHelperTest < Test::Unit::TestCase
14 blog = Blog.create!(:name => 'Blog test', :profile => profile) 15 blog = Blog.create!(:name => 'Blog test', :profile => profile)
15 post = TextileArticle.create!(:name => 'post test', :profile => profile, :parent => blog) 16 post = TextileArticle.create!(:name => 'post test', :profile => profile, :parent => blog)
16 result = article_title(post) 17 result = article_title(post)
17 - assert_match /#{post.created_at}, by #{profile.identifier}/, result 18 + assert_match /#{show_date(post.created_at)}, by #{profile.identifier}/, result
18 end 19 end
19 20
20 should 'not display created-at for non-blog posts' do 21 should 'not display created-at for non-blog posts' do
21 article = TextileArticle.create!(:name => 'article for test', :profile => profile) 22 article = TextileArticle.create!(:name => 'article for test', :profile => profile)
22 result = article_title(article) 23 result = article_title(article)
23 - assert_no_match /#{article.created_at}, by #{profile.identifier}/, result 24 + assert_no_match /#{show_date(article.created_at)}, by #{profile.identifier}/, result
24 end 25 end
25 26
26 should 'create link on title of blog posts' do 27 should 'create link on title of blog posts' do