Commit 1d0e84f427a13509e5ebd0692d39f73bfb02bab4
1 parent
9d2d6b4b
Exists in
master
and in
29 other branches
Fixing short html article test
Showing
1 changed file
with
2 additions
and
7 deletions
Show diff stats
test/unit/article_test.rb
... | ... | @@ -98,13 +98,8 @@ class ArticleTest < ActiveSupport::TestCase |
98 | 98 | end |
99 | 99 | |
100 | 100 | should 'provide short html version' do |
101 | - a = fast_create(Article, :body => 'full body', :abstract => 'lead') | |
102 | - a.stubs(:url).returns({:x=>'none'}) | |
103 | - a.stubs(:link_to).returns('<link>') | |
104 | - def a.content_tag (tag, content, c=nil) | |
105 | - "<#{tag}>#{content}</#{tag}>" | |
106 | - end | |
107 | - assert_match /<div>lead.*/, a.to_html(:format=>'short') | |
101 | + a = fast_create(Article, :body => 'full body', :abstract => 'lead', :profile_id => profile.id) | |
102 | + assert_match /lead/, a.to_html(:format=>'short') | |
108 | 103 | end |
109 | 104 | |
110 | 105 | should 'provide full html version' do | ... | ... |