Browse Source
Merge pull request #832 from Nokecy/addIdentityDataSeederNameField
Add administrative user name value
pull/839/head
Halil İbrahim Kalkan
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
0 deletions
-
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
-
modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs
|
|
|
@ -52,6 +52,7 @@ namespace Volo.Abp.Identity |
|
|
|
} |
|
|
|
|
|
|
|
adminUser = new IdentityUser(_guidGenerator.Create(), adminUserName, "admin@abp.io", tenantId); |
|
|
|
adminUser.Name = adminUserName; |
|
|
|
CheckIdentityErrors(await _userManager.CreateAsync(adminUser, adminUserPassword)); |
|
|
|
result.CreatedAdminUser = true; |
|
|
|
|
|
|
|
|
|
|
|
@ -28,6 +28,7 @@ namespace Volo.Abp.Identity |
|
|
|
await _identityDataSeeder.SeedAsync("1q2w3E*"); |
|
|
|
|
|
|
|
(await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("admin"))).ShouldNotBeNull(); |
|
|
|
(await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("admin"))).Name.ShouldBe("admin"); |
|
|
|
(await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("admin"))).ShouldNotBeNull(); |
|
|
|
} |
|
|
|
} |
|
|
|
|