@@ -891,13 +891,6 @@ describe('HTTP APIs', function () {
891
891
. set ( 'content-type' , 'text/turtle' )
892
892
. expect ( 403 , done )
893
893
} )
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
- } )
901
894
it ( 'should error with 400 if the body is empty and no content type is provided' , function ( done ) {
902
895
server . post ( '/post-tests/' )
903
896
. set ( 'slug' , 'post-resource-empty-fail' )
@@ -921,6 +914,15 @@ describe('HTTP APIs', function () {
921
914
. expect ( hasHeader ( 'acl' , suffixAcl ) )
922
915
. expect ( 201 , done )
923
916
} )
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
+ } )
924
926
it ( 'should fail return 404 if no parent container found' , function ( done ) {
925
927
server . post ( '/hello.html/' )
926
928
. send ( postRequest1Body )
0 commit comments