From b8e7ec5c7925b0f62e9dc6efba28f1271f912801 Mon Sep 17 00:00:00 2001 From: Danail Dimitrov Date: Thu, 28 Jan 2021 22:40:15 +0200 Subject: Fixed the return type of UserService.DeleteUser and refactored UserController.Delete to return BadRequestObjectResult if user is not deleted successfully --- src/DevHive.Tests/DevHive.Services.Tests/UserService.Tests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/DevHive.Tests') diff --git a/src/DevHive.Tests/DevHive.Services.Tests/UserService.Tests.cs b/src/DevHive.Tests/DevHive.Services.Tests/UserService.Tests.cs index 32f2c56..1abc0f1 100644 --- a/src/DevHive.Tests/DevHive.Services.Tests/UserService.Tests.cs +++ b/src/DevHive.Tests/DevHive.Services.Tests/UserService.Tests.cs @@ -333,9 +333,9 @@ namespace DevHive.Services.Tests this.UserRepositoryMock.Setup(p => p.GetByIdAsync(It.IsAny())).Returns(Task.FromResult(user)); this.UserRepositoryMock.Setup(p => p.DeleteAsync(It.IsAny())).Returns(Task.FromResult(shouldPass)); - //bool result = await this.UserService.DeleteUser(id); + bool result = await this.UserService.DeleteUser(id); - Assert.Pass(); + Assert.AreEqual(shouldPass, result); } [Test] -- cgit v1.2.3