Skip to content

Commit

Permalink
fix: fix errors in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdihadeli committed Aug 21, 2024
1 parent 8bf3d4b commit 3456462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public async Task must_returns_not_found_status_code_when_product_with_given_id_
{
pr.Detail.Should().Be($"product with id {notExistsId} not found");
pr.Title.Should().Be(nameof(NotFoundException));
pr.Type.Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.4");
pr.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.5");
})
.And.Be404NotFound();

Expand All @@ -97,7 +97,7 @@ public async Task must_returns_not_found_status_code_when_product_with_given_id_
// .Should()
// .HaveError("title", nameof(NotFoundException))
// .And.HaveError("detail", $"product with id {notExistsId} not found")
// .And.HaveError("type", "https://tools.ietf.org/html/rfc7231#section-6.5.4")
// .And.HaveError("type", "https://tools.ietf.org/html/rfc9110#section-15.5.5")
// .And.HaveErrorMessage($"product with id {notExistsId} not found")
// .And.Be404NotFound();
}
Expand All @@ -120,7 +120,7 @@ public async Task must_returns_bad_request_status_code_with_empty_id()
{
pr.Detail.Should().Contain("'Id' must not be empty.");
pr.Title.Should().Be(nameof(ValidationException));
pr.Type.Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.1");
pr.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.1");
})
.And.Be400BadRequest();

Expand All @@ -132,7 +132,7 @@ public async Task must_returns_bad_request_status_code_with_empty_id()
// {
// Detail = "'Id' must not be empty.",
// Title = nameof(ValidationException),
// Type = "https://tools.ietf.org/html/rfc7231#section-6.5.1",
// Type = "https://tools.ietf.org/html/rfc9110#section-15.5.1",
// }
// )
// .And.Be400BadRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public async Task should_create_new_product_with_valid_input_in_sql_db()
InMemoryLogTrackerProvider.Logs.Informations.Should().NotBeEmpty();

// Arrange

var fakeCategoryId = Guid.NewGuid();

var command = new CreateProductFake(fakeCategoryId).Generate();
Expand Down

0 comments on commit 3456462

Please sign in to comment.