@@ -891,13 +891,6 @@ describe('HTTP APIs', function () {
891891 . set ( 'content-type' , 'text/turtle' )
892892 . expect ( 403 , done )
893893 } )
894- it ( 'should not error with 400 if slug contains invalid suffix' , function ( done ) { // TODO find better name
895- server . post ( '/post-tests/' )
896- . set ( 'slug' , 'put-resource.acl.ttl' )
897- . send ( postRequest1Body )
898- . set ( 'content-type' , 'text-turtle' )
899- . expect ( 201 , done )
900- } )
901894 it ( 'should error with 400 if the body is empty and no content type is provided' , function ( done ) {
902895 server . post ( '/post-tests/' )
903896 . set ( 'slug' , 'post-resource-empty-fail' )
@@ -921,6 +914,15 @@ describe('HTTP APIs', function () {
921914 . expect ( hasHeader ( 'acl' , suffixAcl ) )
922915 . expect ( 201 , done )
923916 } )
917+ it ( 'should create new resource even if slug contains invalid suffix' , function ( done ) {
918+ server . post ( '/post-tests/' )
919+ . set ( 'slug' , 'put-resource.acl.ttl' )
920+ . send ( postRequest1Body )
921+ . set ( 'content-type' , 'text-turtle' )
922+ . expect ( hasHeader ( 'describedBy' , suffixMeta ) )
923+ . expect ( hasHeader ( 'acl' , suffixAcl ) )
924+ . expect ( 201 , done )
925+ } )
924926 it ( 'should fail return 404 if no parent container found' , function ( done ) {
925927 server . post ( '/hello.html/' )
926928 . send ( postRequest1Body )
0 commit comments