Use user's full name even when email is not configured

Change-Id: If29a9fc1e479c1c0413a43272c9f154dd59e8aba
This commit is contained in:
Orgad Shaneh
2013-06-13 14:45:49 +03:00
committed by Shawn Pearce
parent 253611e965
commit c3c6e478c5
2 changed files with 8 additions and 6 deletions

View File

@@ -102,12 +102,13 @@ public class FromAddressGeneratorProviderTest extends TestCase {
public void testUSER_NoPreferredEmailUser() {
setFrom("USER");
final Account.Id user = user("A U. Thor", null);
final String name = "A U. Thor";
final Account.Id user = user(name, null);
replay(accountCache);
final Address r = create().from(user);
assertNotNull(r);
assertEquals(ident.getName(), r.name);
assertEquals(name, r.name);
assertEquals(ident.getEmailAddress(), r.email);
verify(accountCache);
}