Commit 141aa503ee3d7a4e0652c934e2502927cdf352e8
1 parent
5ac2e9b7
Exists in
master
and in
29 other branches
ActionItem411: fallback to login if name is blank
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1894 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/models/person.rb
test/unit/person_test.rb
... | ... | @@ -219,6 +219,12 @@ class PersonTest < Test::Unit::TestCase |
219 | 219 | assert_equal 'randomhacker', p.name |
220 | 220 | end |
221 | 221 | |
222 | + should 'fallback to login when name is blank' do | |
223 | + p = create_user('randomhacker').person | |
224 | + p.name = '' | |
225 | + assert_equal 'randomhacker', p.name | |
226 | + end | |
227 | + | |
222 | 228 | should 'have favorite enterprises' do |
223 | 229 | p = create_user('test_person').person |
224 | 230 | e = Enterprise.create!(:name => 'test_ent', :identifier => 'test_ent') | ... | ... |