Commit 0a37bbeca66b118014a0e67f69fe5d3ff9bb88b3
Committed by
Antonio Terceiro
1 parent
e06ba228
Exists in
master
and in
23 other branches
ActionItem1145: why cannot update profile when email not filled
Showing
2 changed files
with
11 additions
and
0 deletions
Show diff stats
app/models/person.rb
test/unit/person_test.rb
| ... | ... | @@ -565,4 +565,13 @@ class PersonTest < Test::Unit::TestCase |
| 565 | 565 | assert !Profile['testuser1'].add_friend(p2) |
| 566 | 566 | end |
| 567 | 567 | |
| 568 | + should 'not raise exception when validates person without e-mail' do | |
| 569 | + person = create_user('testuser1').person | |
| 570 | + person.user.email = nil | |
| 571 | + | |
| 572 | + assert_nothing_raised ActiveRecord::RecordInvalid do | |
| 573 | + assert !person.save | |
| 574 | + end | |
| 575 | + end | |
| 576 | + | |
| 568 | 577 | end | ... | ... |