@@ -135,6 +135,14 @@ describe('ACL HTTP', function() {
135135 } ) ;
136136 } )
137137 describe ( "with defaultForNew in parent path" , function ( ) {
138+ before ( function ( ) {
139+ rm ( '/acl/write-acl/empty-acl/another-empty-folder/test-file.acl' ) ;
140+ rm ( '/acl/write-acl/empty-acl/test-folder/test-file' ) ;
141+ rm ( '/acl/write-acl/empty-acl/test-file' ) ;
142+ rm ( '/acl/write-acl/test-file' ) ;
143+ rm ( '/acl/write-acl/test-file.acl' ) ;
144+ } ) ;
145+
138146 it ( "should fail to create a container" , function ( done ) {
139147 var options = createOptions ( '/acl/write-acl/empty-acl/test-folder/' , 'user1' ) ;
140148 options . body = "" ;
@@ -219,10 +227,22 @@ describe('ACL HTTP', function() {
219227 done ( ) ;
220228 } ) ;
221229 } ) ;
230+
231+ after ( function ( ) {
232+ rm ( '/acl/write-acl/empty-acl/another-empty-folder/test-file.acl' ) ;
233+ rm ( '/acl/write-acl/empty-acl/test-folder/test-file' ) ;
234+ rm ( '/acl/write-acl/empty-acl/test-file' ) ;
235+ rm ( '/acl/write-acl/test-file' ) ;
236+ rm ( '/acl/write-acl/test-file.acl' ) ;
237+ } ) ;
222238 } )
223239 } ) ;
224240
225241 describe ( "Origin" , function ( ) {
242+ before ( function ( ) {
243+ rm ( 'acl/origin/test-folder/.acl' ) ;
244+ } ) ;
245+
226246 it ( "Should PUT new ACL file" , function ( done ) {
227247 var options = createOptions ( '/acl/origin/test-folder/.acl' , 'user1' ) ;
228248 options . headers = {
@@ -316,6 +336,10 @@ describe('ACL HTTP', function() {
316336 done ( ) ;
317337 } ) ;
318338 } ) ;
339+
340+ after ( function ( ) {
341+ rm ( 'acl/origin/test-folder/.acl' ) ;
342+ } ) ;
319343 } ) ;
320344
321345 describe . skip ( "Owner-only" , function ( ) {
@@ -849,6 +873,11 @@ describe('ACL HTTP', function() {
849873 } ) ;
850874
851875 describe ( "defaultForNew" , function ( ) {
876+ before ( function ( ) {
877+ rm ( '/acl/write-acl/default-for-new/.acl' ) ;
878+ rm ( '/acl/write-acl/default-for-new/test-file.ttl' ) ;
879+ } ) ;
880+
852881 var body = "<#Owner>\n" +
853882 " <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n" +
854883 " <http://www.w3.org/ns/auth/acl#agent> <" + user1 + ">;\n" +
@@ -947,6 +976,11 @@ describe('ACL HTTP', function() {
947976 done ( ) ;
948977 } ) ;
949978 } ) ;
979+
980+ after ( function ( ) {
981+ rm ( '/acl/write-acl/default-for-new/.acl' ) ;
982+ rm ( '/acl/write-acl/default-for-new/test-file.ttl' ) ;
983+ } ) ;
950984 } ) ;
951985
952986 describe ( "WebID delegation tests" , function ( ) {
@@ -1001,4 +1035,4 @@ describe('ACL HTTP', function() {
10011035 }
10021036 } ) ;
10031037 } ) ;
1004- } ) ;
1038+ } ) ;
0 commit comments