Commit 6c8063ab31cfcb38e0c1dfcd6e38293d04079bbc
1 parent
8d0004fb
Exists in
master
and in
29 other branches
ActionItem1049: fixing tests
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/article_block.rb
| @@ -17,7 +17,7 @@ class ArticleBlock < Block | @@ -17,7 +17,7 @@ class ArticleBlock < Block | ||
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | def article_id= value | 19 | def article_id= value |
| 20 | - self.settings[:article_id] = value.to_i | 20 | + self.settings[:article_id] = value.blank? ? nil : value.to_i |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | def article(reload = false) | 23 | def article(reload = false) |
test/functional/profile_controller_test.rb
| @@ -135,7 +135,7 @@ class ProfileControllerTest < Test::Unit::TestCase | @@ -135,7 +135,7 @@ class ProfileControllerTest < Test::Unit::TestCase | ||
| 135 | should 'show friends link to person' do | 135 | should 'show friends link to person' do |
| 136 | person = create_user('person_1').person | 136 | person = create_user('person_1').person |
| 137 | get :index, :profile => person.identifier | 137 | get :index, :profile => person.identifier |
| 138 | - assert_tag :tag => 'a', :content => 'Friends', :attributes => { :href => /profile\/#{person.identifier}\/friends$/ } | 138 | + assert_tag :tag => 'a', :content => /Friends/, :attributes => { :href => /profile\/#{person.identifier}\/friends$/ } |
| 139 | end | 139 | end |
| 140 | 140 | ||
| 141 | should 'not show homepage and feed automatically created on recent content' do | 141 | should 'not show homepage and feed automatically created on recent content' do |
| @@ -336,7 +336,7 @@ class ProfileControllerTest < Test::Unit::TestCase | @@ -336,7 +336,7 @@ class ProfileControllerTest < Test::Unit::TestCase | ||
| 336 | login_as 'tusr1' | 336 | login_as 'tusr1' |
| 337 | 337 | ||
| 338 | get :index, :profile => 'tusr2' | 338 | get :index, :profile => 'tusr2' |
| 339 | - assert_tag :content => /t2@t2.com/ | 339 | + assert_tag :content => /t2.*t2.com/ |
| 340 | end | 340 | end |
| 341 | 341 | ||
| 342 | should 'not show e-mail for non friends on profile page' do | 342 | should 'not show e-mail for non friends on profile page' do |