Skip to content

Commit 8a94e3f

Browse files
committed
fix: improve
1 parent 890d91a commit 8a94e3f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/ResourceTypeMismatchTests.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public async Task Posting_Resource_With_Mismatching_Resource_Type_Returns_Confli
3030
});
3131

3232
// Act
33-
var (body, response) = await Post("/api/v1/todoItems", content);
33+
var (body, _) = await Post("/api/v1/todoItems", content);
3434

3535
// Assert
3636
var errorDocument = JsonConvert.DeserializeObject<ErrorDocument>(body);
@@ -54,17 +54,16 @@ public async Task Patching_Resource_With_Mismatching_Resource_Type_Returns_Confl
5454
});
5555

5656
// Act
57-
var (body, response) = await Patch("/api/v1/todoItems/1", content);
57+
var (body, _) = await Patch("/api/v1/todoItems/1", content);
5858

5959
// Assert
60-
6160
var errorDocument = JsonConvert.DeserializeObject<ErrorDocument>(body);
6261
Assert.Single(errorDocument.Errors);
6362
Assert.Equal(HttpStatusCode.Conflict, errorDocument.Errors[0].StatusCode);
6463
Assert.Equal("Resource type mismatch between request body and endpoint URL.", errorDocument.Errors[0].Title);
6564
Assert.Equal("Expected resource of type 'todoItems' in PATCH request body at endpoint '/api/v1/todoItems/1', instead of 'people'.", errorDocument.Errors[0].Detail);
6665
}
67-
66+
6867
[Fact]
6968
public async Task Patching_Through_Relationship_Link_With_Mismatching_Resource_Type_Returns_Conflict()
7069
{
@@ -79,10 +78,9 @@ public async Task Patching_Through_Relationship_Link_With_Mismatching_Resource_T
7978
});
8079

8180
// Act
82-
var (body, response) = await Patch("/api/v1/todoItems/1/relationships/owner", content);
81+
var (body, _) = await Patch("/api/v1/todoItems/1/relationships/owner", content);
8382

8483
// Assert
85-
8684
var errorDocument = JsonConvert.DeserializeObject<ErrorDocument>(body);
8785
Assert.Single(errorDocument.Errors);
8886
Assert.Equal(HttpStatusCode.Conflict, errorDocument.Errors[0].StatusCode);

0 commit comments

Comments
 (0)