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 10
10
describe ( 'File' , function ( ) {
11
11
describe ( 'Saving base64' , function ( ) {
12
12
var base64 = 'd29ya2luZyBhdCBhdm9zY2xvdWQgaXMgZ3JlYXQh' ;
13
- var fileName = 'base64 .txt' ;
13
+ var fileName = '中文 .txt' ;
14
14
15
15
it ( 'should be saved' , function ( ) {
16
16
var file = new AV . File ( fileName , { base64 : base64 } ) ;
@@ -29,7 +29,9 @@ describe('File', function() {
29
29
file . metaData ( 'format' , 'txt file' ) ;
30
30
file . setACL ( new AV . ACL ( ) ) ;
31
31
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
+ ) ;
33
35
expect ( file . ownerId ( ) ) . to . be . ok ( ) ;
34
36
expect ( file . id ) . to . be . ok ( ) ;
35
37
expect ( file . metaData ( 'format' ) ) . to . be ( 'txt file' ) ;
You can’t perform that action at this time.
0 commit comments