@@ -551,7 +551,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
551551 done ( )
552552 } )
553553 } )
554- it . skip ( 'user1 should be able to PATCH a resource' , function ( done ) {
554+ it ( 'user1 should be able to PATCH (which CREATEs) a nonexistent resource' , function ( done ) {
555555 const options = createOptions ( '/append-inherited/test.ttl' , 'user1' )
556556 options . body = 'INSERT DATA { :test :hello 456 .}'
557557 options . headers [ 'content-type' ] = 'application/sparql-update'
@@ -589,6 +589,16 @@ describe('ACL with WebID+OIDC over HTTP', function () {
589589 done ( )
590590 } )
591591 } )
592+ it ( 'user2 should be able to PATCH INSERT to (which CREATEs) a nonexistent resource' , function ( done ) {
593+ const options = createOptions ( '/append-inherited/new.ttl' , 'user2' )
594+ options . body = 'INSERT DATA { :test :hello 789 .}'
595+ options . headers [ 'content-type' ] = 'application/sparql-update'
596+ request . patch ( options , function ( error , response , body ) {
597+ assert . equal ( error , null )
598+ assert . equal ( response . statusCode , 200 )
599+ done ( )
600+ } )
601+ } )
592602 it ( 'user2 should not be able to access test file\'s ACL file' , function ( done ) {
593603 const options = createOptions ( '/append-acl/abc.ttl.acl' , 'user2' , 'text/turtle' )
594604 request . head ( options , function ( error , response , body ) {
@@ -648,6 +658,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
648658 } )
649659 after ( function ( ) {
650660 rm ( '/accounts-acl/tim.localhost/append-inherited/test.ttl' )
661+ rm ( '/accounts-acl/tim.localhost/append-inherited/new.ttl' )
651662 } )
652663 } )
653664
0 commit comments