From 6c8063ab31cfcb38e0c1dfcd6e38293d04079bbc Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 28 May 2009 20:18:44 -0300 Subject: [PATCH] ActionItem1049: fixing tests --- app/models/article_block.rb | 2 +- test/functional/profile_controller_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/article_block.rb b/app/models/article_block.rb index 64263a5..b83a265 100644 --- a/app/models/article_block.rb +++ b/app/models/article_block.rb @@ -17,7 +17,7 @@ class ArticleBlock < Block end def article_id= value - self.settings[:article_id] = value.to_i + self.settings[:article_id] = value.blank? ? nil : value.to_i end def article(reload = false) diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index ef7acf5..49d34d1 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -135,7 +135,7 @@ class ProfileControllerTest < Test::Unit::TestCase should 'show friends link to person' do person = create_user('person_1').person get :index, :profile => person.identifier - assert_tag :tag => 'a', :content => 'Friends', :attributes => { :href => /profile\/#{person.identifier}\/friends$/ } + assert_tag :tag => 'a', :content => /Friends/, :attributes => { :href => /profile\/#{person.identifier}\/friends$/ } end should 'not show homepage and feed automatically created on recent content' do @@ -336,7 +336,7 @@ class ProfileControllerTest < Test::Unit::TestCase login_as 'tusr1' get :index, :profile => 'tusr2' - assert_tag :content => /t2@t2.com/ + assert_tag :content => /t2.*t2.com/ end should 'not show e-mail for non friends on profile page' do -- libgit2 0.21.2