small refactor for ember actions

This commit is contained in:
2014-08-13 17:07:26 +02:00
parent a675999d01
commit 446cf08afb
17 changed files with 54 additions and 30 deletions
+11
View File
@@ -12,4 +12,15 @@ describe User do
user.supplier_name.should == I18n.t('user.unknown_supplier_name')
end
end
describe '#friends_name' do
it "displays the auth data nickname if available" do
user.auth_data = {'info' => {'name' => 'Benji setup', 'nickname' => 'Benji'}}
user.friends_name.should == 'Benji'
end
it 'falls back to unkown if not present' do
user.friends_name.should == ''
end
end
end