File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1010describe ( 'File' , function ( ) {
1111 describe ( 'Saving base64' , function ( ) {
1212 var base64 = 'd29ya2luZyBhdCBhdm9zY2xvdWQgaXMgZ3JlYXQh' ;
13- var fileName = 'base64 .txt' ;
13+ var fileName = '中文 .txt' ;
1414
1515 it ( 'should be saved' , function ( ) {
1616 var file = new AV . File ( fileName , { base64 : base64 } ) ;
@@ -29,7 +29,9 @@ describe('File', function() {
2929 file . metaData ( 'format' , 'txt file' ) ;
3030 file . setACL ( new AV . ACL ( ) ) ;
3131 return file . save ( { keepFileName : true } ) . then ( function ( ) {
32- expect ( file . url ( ) ) . to . match ( new RegExp ( fileName + '$' ) ) ;
32+ expect ( file . url ( ) ) . to . match (
33+ new RegExp ( encodeURIComponent ( fileName ) + '$' )
34+ ) ;
3335 expect ( file . ownerId ( ) ) . to . be . ok ( ) ;
3436 expect ( file . id ) . to . be . ok ( ) ;
3537 expect ( file . metaData ( 'format' ) ) . to . be ( 'txt file' ) ;
You can’t perform that action at this time.
0 commit comments