Exemplo n.º 1
0
        public void DeactivateOrDeleteAdmin_returns_not_found_when_trying_to_access_page_for_own_admin_account()
        {
            // Given
            var adminUser = UserTestHelper.GetDefaultAdminUser();

            A.CallTo(() => userDataService.GetAdminUserById(adminUser.Id)).Returns(adminUser);

            // When
            var result = administratorController.DeactivateOrDeleteAdmin(adminUser.Id, ReturnPageQueryHelper.GetDefaultReturnPageQuery());

            // Then
            result.Should().BeNotFoundResult();
        }