public async Task Change_Quantity_Of_Item_Should_Return_NotFound_When_Basket_Does_Not_Exist() { var customerId = 5; var itemId = 7; var quantity = 1; var request = new ChangeQuantityOfBasketItemRequest() { Quantity = quantity, ItemId = itemId }; var response = await Client.PutAsync($"/api/v1/basket/{customerId}/items", request.ToJsonStringContent()); response.StatusCode.Should().Be(HttpStatusCode.NotFound); }
public async Task Change_Quantity_Of_Item_Should_Return_Success() { var customerId = 5; var itemId = 1; const int quantity = 6; var request = new ChangeQuantityOfBasketItemRequest() { Quantity = quantity, ItemId = itemId }; var response = await Client.PutAsync($"/api/v1/basket/{customerId}/items", request.ToJsonStringContent()); response.EnsureSuccessStatusCode(); }