frasermclean / adoptrix

Pet adoption centre platform
https://demo.adoptrix.com
MIT License
1 stars 0 forks source link

User management features #98

Closed frasermclean closed 3 weeks ago

github-actions[bot] commented 2 months ago

Solution test results

98 tests  +24   98 :white_check_mark: +24   12s :stopwatch: -1s  6 suites ± 0    0 :zzz: ± 0   6 files   ± 0    0 :x: ± 0 

Results for commit 206497cb. ± Comparison against base commit 9b274db4.

This pull request removes 7 and adds 31 tests. Note that renamed tests count towards both. ``` Adoptrix.Api.Tests.Services.UsersServiceTests ‑ GetAllUsersAsync_WithValidResponse_ShouldReturnUsers Adoptrix.Api.Tests.Services.UsersServiceTests ‑ GetUserAsync_WithInvalidUserId_ShouldReturnError Adoptrix.Api.Tests.Services.UsersServiceTests ‑ GetUserAsync_WithValidUserId_ShouldReturnUser Adoptrix.Jobs.Tests.Functions.CleanupDeletedAnimalTests ‑ ExecuteAsync_WithValidEventData_ShouldPass(eventData: AnimalDeletedEvent { AnimalSlug = AnimalSlug48fe0cef-5ebc-4fc7-ae21-46eefc580700 }, animalImagesManagerMock: Mock, function: CleanupDeletedAnimal { }) Adoptrix.Jobs.Tests.Functions.ProcessAnimalImageTests ‑ ExecuteAsync_WithInvalidAnimalSlug_ShouldThrowException(data: AnimalImageAddedEvent { AnimalSlug = AnimalSlugfb00279a-a196-431a-ba61-1a9bbb00f245, ImageId = 6b389dd0-f216-4613-8183-4659e6fa2399, BlobName = BlobNamee3a2b492-b1ee-4878-8cf7-fbefbbe11849 }, animalImagesManagerMock: Mock, function: ProcessAnimalImage { }) Adoptrix.Jobs.Tests.Functions.ProcessAnimalImageTests ‑ ExecuteAsync_WithValidEventData_ShouldPass(data: AnimalImageAddedEvent { AnimalSlug = AnimalSlug21940e44-9029-4e51-a2c1-337fc344b5d1, ImageId = 45648556-503e-4f47-8749-3069f2b3f809, BlobName = BlobName9866c49c-da9d-4431-9b33-5e83d606e796 }, animalImagesManagerMock: Mock, function: ProcessAnimalImage { }) Adoptrix.Logic.Tests.Services.AnimalImagesManagerTests ‑ DeleteImagesAsync_WithValidData_ShouldPass ``` ``` Adoptrix.Api.Tests.Endpoints.Users.AddUserRoleEndpointTests ‑ AddUserRole_WithAlreadyAssignedRole_ShouldReturnBadRequest Adoptrix.Api.Tests.Endpoints.Users.AddUserRoleEndpointTests ‑ AddUserRole_WithInvalidRole_ShouldReturnBadRequest Adoptrix.Api.Tests.Endpoints.Users.AddUserRoleEndpointTests ‑ AddUserRole_WithNonExistingUser_ShouldReturnNotFound Adoptrix.Api.Tests.Endpoints.Users.AddUserRoleEndpointTests ‑ AddUserRole_WithUnauthorizedUser_ShouldReturnForbidden Adoptrix.Api.Tests.Endpoints.Users.AddUserRoleEndpointTests ‑ AddUserRole_WithValidRequest_ShouldReturnOk Adoptrix.Api.Tests.Endpoints.Users.GetCurrentUserEndpointTests ‑ GetCurrentUser_WithValidRequest_ShouldReturnOk Adoptrix.Api.Tests.Endpoints.Users.RemoveUserRoleEndpointTests ‑ RemoveUserRole_WhenRoleIsNotAlreadyAssigned_ShouldReturnBadRequest Adoptrix.Api.Tests.Endpoints.Users.RemoveUserRoleEndpointTests ‑ RemoveUserRole_WithNonExistingUser_ShouldReturnNotFound Adoptrix.Api.Tests.Endpoints.Users.RemoveUserRoleEndpointTests ‑ RemoveUserRole_WithUnauthorizedUser_ShouldReturnForbidden Adoptrix.Api.Tests.Endpoints.Users.RemoveUserRoleEndpointTests ‑ RemoveUserRole_WithValidRequest_ShouldReturnOk … ```

:recycle: This comment has been updated with latest results.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 87.86611% with 58 lines in your changes missing coverage. Please review.

Project coverage is 74.98%. Comparing base (9b274db) to head (206497c). Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
...ix.Client/Authentication/AdoptrixAccountFactory.cs 0.00% 22 Missing :warning:
src/Adoptrix.Client/Program.cs 0.00% 8 Missing :warning:
src/Adoptrix.Logic/Services/UserManager.cs 90.47% 1 Missing and 7 partials :warning:
src/Adoptrix.Api/Startup/AppConfiguration.cs 0.00% 4 Missing :warning:
src/Adoptrix.Jobs/Program.cs 0.00% 4 Missing :warning:
src/Adoptrix.Logic/ServiceRegistration.cs 57.14% 3 Missing :warning:
src/Adoptrix.Logic/Services/BreedsService.cs 90.90% 2 Missing and 1 partial :warning:
.../Adoptrix.Client/Authentication/AdoptrixAccount.cs 0.00% 2 Missing :warning:
...optrix.Api/Extensions/ClaimsPrincipalExtensions.cs 75.00% 0 Missing and 1 partial :warning:
...lient/Extensions/SearchAnimalsRequestExtensions.cs 0.00% 1 Missing :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #98 +/- ## ========================================== + Coverage 73.70% 74.98% +1.28% ========================================== Files 119 139 +20 Lines 1544 1775 +231 Branches 97 120 +23 ========================================== + Hits 1138 1331 +193 - Misses 385 419 +34 - Partials 21 25 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.