diff options
| author | transtrike <transtrike@gmail.com> | 2021-02-16 18:07:51 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-02-16 18:07:51 +0200 |
| commit | 72502154725594cf31878aa944f4bc9d9f3521a3 (patch) | |
| tree | 6ea1f475f35fba320b32664084d4c39e2d084e49 /src/Data/DevHive.Data.Tests | |
| parent | a2ca63701b71eed2ffa3fff6de16b9babe8bba08 (diff) | |
| download | DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.tar DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.tar.gz DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.zip | |
UserManager&RoleManager logic moved to Repo; Password hashing and validation moved to Repo and using ASPNET Core hashing methods; Added Migrations; Fixed Roles not added to user
Diffstat (limited to 'src/Data/DevHive.Data.Tests')
| -rw-r--r-- | src/Data/DevHive.Data.Tests/UserRepositoryTests.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Data/DevHive.Data.Tests/UserRepositoryTests.cs b/src/Data/DevHive.Data.Tests/UserRepositoryTests.cs index 43e9a36..5f84e34 100644 --- a/src/Data/DevHive.Data.Tests/UserRepositoryTests.cs +++ b/src/Data/DevHive.Data.Tests/UserRepositoryTests.cs @@ -234,7 +234,7 @@ namespace DevHive.Data.Tests // } #endregion - #region DoesUserHaveThisUsername + #region DoesUserHaveThisUsernameAsync [Test] public async Task DoesUserHaveThisUsername_ReturnsTrue_WhenUserHasTheGivenUsername() { @@ -242,9 +242,9 @@ namespace DevHive.Data.Tests this._context.Users.Add(dummyUser); await this._context.SaveChangesAsync(); - bool result = this._userRepository.DoesUserHaveThisUsername(dummyUser.Id, dummyUser.UserName); + bool result = this._userRepository.DoesUserHaveThisUsernameAsync(dummyUser.Id, dummyUser.UserName); - Assert.IsTrue(result, "DoesUserHaveThisUsername does not return true when the user has the given name"); + Assert.IsTrue(result, "DoesUserHaveThisUsernameAsync does not return true when the user has the given name"); } [Test] @@ -255,7 +255,7 @@ namespace DevHive.Data.Tests this._context.Users.Add(dummyUser); await this._context.SaveChangesAsync(); - bool result = this._userRepository.DoesUserHaveThisUsername(dummyUser.Id, username); + bool result = this._userRepository.DoesUserHaveThisUsernameAsync(dummyUser.Id, username); Assert.IsFalse(result, "DoesUserNameExistAsync does not return false when user doesnt have the given name"); } |
