Skip to content

Commit 140190b

Browse files
authored
Merge pull request #780 from fossa-app/validation-message-fix
Validation message fix
2 parents 1cac6aa + da9202d commit 140190b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/API.Core/Validators/EmployeeManagementCommandValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public EmployeeManagementCommandValidator(
4848

4949
RuleFor(x => x.ReportsToId)
5050
.MustAsync(ValidateReportsToIdNoCyclesAsync)
51-
.WithMessage("ReportsToId must exist and belong to the same tenant");
51+
.WithMessage("ReportsToId must not be cyclical.");
5252
}
5353

5454
private async Task<bool> ValidateBranchAsync(EmployeeManagementCommand command, Option<BranchId> assignedBranchId, CancellationToken cancellationToken)

tests/API.FunctionalTests/ControllerApis/EmployeeControllerWithSystemLicense.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ private async Task<EmployeeRetrievalModel> CreateEmployeeAsync(HttpClient client
420420
var creationResponse = await client.PostAsJsonAsync("/api/1.0/Employee", new EmployeeModificationModel(firstName, lastName, $"{firstName} {lastName}"));
421421
if (creationResponse.StatusCode != HttpStatusCode.OK)
422422
{
423-
_testOutputHelper.WriteLine(await creationResponse.Content.ReadAsStringAsync());
423+
_testOutputHelper.WriteLine(await creationResponse.Content.ReadAsStringAsync());
424424
}
425425
creationResponse.StatusCode.ShouldBe(HttpStatusCode.OK);
426426

0 commit comments

Comments
 (0)