File tree Expand file tree Collapse file tree
test/JsonApiDotNetCoreTests/IntegrationTests/Meta Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ public async Task Accepts_meta_in_atomic_remove_resource_operation()
106106 var store = _testContext . Factory . Services . GetRequiredService < RequestDocumentStore > ( ) ;
107107
108108 Dictionary < string , object ? > documentMeta = _fakers . DocumentMeta . GenerateOne ( ) ;
109+ Dictionary < string , object ? > operationMeta = _fakers . ResourceMeta . GenerateOne ( ) ;
109110
110111 SupportTicket existingTicket = _fakers . SupportTicket . GenerateOne ( ) ;
111112
@@ -126,7 +127,8 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
126127 {
127128 type = "supportTickets" ,
128129 id = existingTicket . StringId
129- }
130+ } ,
131+ meta = operationMeta
130132 }
131133 } ,
132134 meta = documentMeta
@@ -145,6 +147,13 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
145147 store . Document . Should ( ) . NotBeNull ( ) ;
146148
147149 store . Document . Meta . Should ( ) . BeEquivalentToJson ( documentMeta ) ;
150+
151+ store . Document . Operations . Should ( ) . HaveCount ( 1 ) ;
152+
153+ AtomicOperationObject ? operation = store . Document . Operations [ 0 ] ;
154+ operation . Should ( ) . NotBeNull ( ) ;
155+
156+ operation . Meta . Should ( ) . BeEquivalentToJson ( operationMeta ) ;
148157 }
149158
150159 [ Fact ]
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
178178 store . Document . Meta . Should ( ) . BeEquivalentToJson ( documentMeta ) ;
179179
180180 store . Document . Data . SingleValue . Should ( ) . NotBeNull ( ) ;
181+
181182 store . Document . Data . SingleValue . Meta . Should ( ) . BeEquivalentToJson ( resourceMeta ) ;
182183
183184 store . Document . Data . SingleValue . Relationships . Should ( ) . NotBeNull ( ) ;
@@ -504,7 +505,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
504505 id = existingTicket2 . StringId ,
505506 meta = identifierMeta2
506507 } ,
507- } ,
508+ }
508509 meta = documentMeta
509510 } ;
510511
You can’t perform that action at this time.
0 commit comments