@@ -130,6 +130,35 @@ solid:inserts { <u> <v> <z>. }.`
130130 expect ( notification . origin ) . to . match ( / s a m p l e C o n t a i n e r \/ .* e x a m p l e - p r e p .t t l $ / )
131131 } )
132132
133+ it ( 'when a contained container is created' , async function ( ) {
134+ await fetch ( 'http://localhost:8443/sampleContainer/example-prep/' , {
135+ method : 'PUT' ,
136+ headers : {
137+ 'Content-Type' : 'text/turtle'
138+ }
139+ } )
140+ const { value } = await notificationsIterator . next ( )
141+ expect ( value . headers . get ( 'content-type' ) ) . to . match ( / a p p l i c a t i o n \/ l d \+ j s o n / )
142+ const notification = await value . json ( )
143+ expect ( notification ) . to . haveOwnProperty ( 'published' )
144+ expect ( notification . type ) . to . equal ( 'Add' )
145+ expect ( notification . target ) . to . match ( / s a m p l e C o n t a i n e r \/ e x a m p l e - p r e p \/ $ / )
146+ expect ( notification . object ) . to . match ( / s a m p l e C o n t a i n e r \/ $ / )
147+ } )
148+
149+ it ( 'when a contained container is deleted' , async function ( ) {
150+ await fetch ( 'http://localhost:8443/sampleContainer/example-prep/' , {
151+ method : 'DELETE'
152+ } )
153+ const { value } = await notificationsIterator . next ( )
154+ expect ( value . headers . get ( 'content-type' ) ) . to . match ( / a p p l i c a t i o n \/ l d \+ j s o n / )
155+ const notification = await value . json ( )
156+ expect ( notification ) . to . haveOwnProperty ( 'published' )
157+ expect ( notification . type ) . to . equal ( 'Remove' )
158+ expect ( notification . origin ) . to . match ( / s a m p l e C o n t a i n e r \/ e x a m p l e - p r e p \/ $ / )
159+ expect ( notification . object ) . to . match ( / s a m p l e C o n t a i n e r \/ $ / )
160+ } )
161+
133162 it ( 'when a container is created by POST' ,
134163 async function ( ) {
135164 await fetch ( 'http://localhost:8443/sampleContainer/' , {
0 commit comments