Skip to content

Commit c1db1d5

Browse files
committed
chore: add explanation to test
1 parent 7376baf commit c1db1d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/UpdatingRelationshipsTests.cs

+6
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ public async Task Can_Update_ToMany_Relationship_By_Patching_Resource()
296296
[Fact]
297297
public async Task Can_Update_ToMany_Relationship_By_Patching_Resource_When_Targets_Already_Attached()
298298
{
299+
// It is possible that entities we're creating relationships to
300+
// have already been included in dbContext the application beyond control
301+
// of JANDC. For example: a user may have been loaded when checking permissions
302+
// in business logic in controllers. In this case,
303+
// this user may not be reattached to the db context in the repository.
304+
299305
// arrange
300306
var todoCollection = new TodoItemCollection();
301307
todoCollection.TodoItems = new List<TodoItem>();

0 commit comments

Comments
 (0)