✏️ Clean up comment, update Postman collection
continuous-integration/drone/push Build is passing Details

pull/63/head
Alexis Drai 2 years ago
parent 48c0e0f03b
commit 5ff2160e92

@ -111,16 +111,8 @@ namespace cat_cafe.Controllers.Tests
// Act
var responseType = await controller.PutCat(bob.Id, robert);
// System.InvalidOperationException:
// The instance of entity type 'Cat' cannot be tracked because another instance
// with the same key value for {'Id'} is already being tracked.
// ... this simple update should work out of the box,
// DbContext is already 'scoped' by default instead of singleton
// Assert
responseType.Should().BeOfType<NoContentResult>();
// responseType.Result.Should().BeOfType<NoContentResult>();
var actual = await controller.GetCat(bob.Id);
var actualResult = actual.Result as OkObjectResult;
actualResult!.Value.Should().BeEquivalentTo(robert);

@ -225,6 +225,145 @@
}
},
"response": []
},
{
"name": "Create bar 1",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"The Black Cap\",\r\n \"catIds\" : [2, 3]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://localhost:5003/gateway/bars",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"bars"
]
}
},
"response": []
},
{
"name": "Read all bars",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5003/gateway/bars",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"bars"
]
}
},
"response": []
},
{
"name": "Read all cats (v2) Copy",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5003/gateway/cats",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"cats"
]
}
},
"response": []
},
{
"name": "Update Bar 1",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 1,\r\n \"name\": \"The Black Cap\",\r\n \"catIds\" : [3]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://localhost:5003/gateway/bars/1",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"bars",
"1"
]
}
},
"response": []
},
{
"name": "Read all bars Copy",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5003/gateway/bars",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"bars"
]
}
},
"response": []
},
{
"name": "Read all cats (v2) Copy 2",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5003/gateway/cats",
"protocol": "https",
"host": [
"localhost"
],
"port": "5003",
"path": [
"gateway",
"cats"
]
}
},
"response": []
}
]
}
Loading…
Cancel
Save