@@ -34,23 +34,29 @@ describe('setup', function() {
3434 expect ( flow . opts . simultaneousUploads ) . toBe ( flow . defaults . simultaneousUploads ) ;
3535 } ) ;
3636
37- it ( 'test methods' , function ( ) {
38- expect ( flow . getFromUniqueIdentifier ( '' ) ) . toBe ( false ) ;
37+ it ( 'should show methods initial state' , function ( ) {
38+ expect ( flow . uploadNextChunk ( ) ) . toBe ( false ) ;
39+
3940 expect ( flow . progress ( ) ) . toBe ( 0 ) ;
4041 expect ( flow . isUploading ( ) ) . toBe ( false ) ;
41- expect ( flow . uploadNextChunk ( ) ) . toBe ( false ) ;
4242 expect ( flow . timeRemaining ( ) ) . toBe ( 0 ) ;
4343 expect ( flow . sizeUploaded ( ) ) . toBe ( 0 ) ;
4444 } ) ;
4545
46- it ( 'test getSize ' , function ( ) {
46+ it ( 'should return total files size ' , function ( ) {
4747 expect ( flow . getSize ( ) ) . toBe ( 0 ) ;
4848 flow . addFile ( new Blob ( [ '1234' ] ) ) ;
4949 expect ( flow . getSize ( ) ) . toBe ( 4 ) ;
5050 flow . addFile ( new Blob ( [ '123' ] ) ) ;
5151 expect ( flow . getSize ( ) ) . toBe ( 7 ) ;
5252 } ) ;
5353
54+ it ( 'should find file by identifier' , function ( ) {
55+ expect ( flow . getFromUniqueIdentifier ( '' ) ) . toBe ( false ) ;
56+ flow . addFile ( new Blob ( [ '1234' ] ) ) ;
57+ expect ( flow . getFromUniqueIdentifier ( 4 ) ) . toBe ( flow . files [ 0 ] ) ;
58+ } ) ;
59+
5460 describe ( 'assignBrowse' , function ( ) {
5561 it ( 'assign to input' , function ( ) {
5662 var input = document . createElement ( 'input' ) ;
0 commit comments