Skip to content

Commit f773df6

Browse files
author
Bart Koelman
committed
Fixed invalid test
1 parent 6247d5c commit f773df6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/JsonApiDotNetCoreTests/IntegrationTests/ReadWrite/Updating/Resources/UpdateResourceTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,11 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
963963
public async Task Cannot_update_resource_with_readonly_attribute()
964964
{
965965
// Arrange
966-
WorkItem existingWorkItem = _fakers.WorkItem.Generate();
966+
WorkItemGroup existingWorkItemGroup = _fakers.WorkItemGroup.Generate();
967967

968968
await _testContext.RunOnDatabaseAsync(async dbContext =>
969969
{
970-
dbContext.WorkItems.Add(existingWorkItem);
970+
dbContext.Groups.Add(existingWorkItemGroup);
971971
await dbContext.SaveChangesAsync();
972972
});
973973

@@ -976,15 +976,15 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
976976
data = new
977977
{
978978
type = "workItemGroups",
979-
id = existingWorkItem.StringId,
979+
id = existingWorkItemGroup.StringId,
980980
attributes = new
981981
{
982982
isDeprecated = true
983983
}
984984
}
985985
};
986986

987-
string route = $"/workItemGroups/{existingWorkItem.StringId}";
987+
string route = $"/workItemGroups/{existingWorkItemGroup.StringId}";
988988

989989
// Act
990990
(HttpResponseMessage httpResponse, Document responseDocument) = await _testContext.ExecutePatchAsync<Document>(route, requestBody);

0 commit comments

Comments
 (0)