From 72502154725594cf31878aa944f4bc9d9f3521a3 Mon Sep 17 00:00:00 2001 From: transtrike Date: Tue, 16 Feb 2021 18:07:51 +0200 Subject: 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 --- src/Data/DevHive.Data.Tests/UserRepositoryTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Data/DevHive.Data.Tests/UserRepositoryTests.cs') 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"); } -- cgit v1.2.3