mw.Upload: Refactor error handling for the umpteenth time
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki.api / mediawiki.api.upload.test.js
index 030e703..10fcd5d 100644 (file)
@@ -5,8 +5,9 @@
                QUnit.expect( 2 );
                var api = new mw.Api();
                assert.ok( api.upload );
-               // The below will return a rejected deferred, but that's OK.
-               assert.ok( api.upload() );
+               assert.throws( function () {
+                       api.upload();
+               } );
        } );
 
        QUnit.test( 'Set up iframe upload', function ( assert ) {