http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99432
Revision: 99432
Author: neilk
Date: 2011-10-10 21:33:00 +0000 (Mon, 10 Oct 2011)
Log Message:
-----------
ensured uri is scoped in a few tests
Modified Paths:
--------------
trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js
Modified: trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js
===================================================================
--- trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js 2011-10-10
21:32:17 UTC (rev 99431)
+++ trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js 2011-10-10
21:33:00 UTC (rev 99432)
@@ -240,35 +240,34 @@
it( "should throw error on no arguments to constructor",
function() {
expect( function() {
- uri = new mw.Uri();
+ var uri = new mw.Uri();
} ).toThrow( "Bad constructor arguments" );
} );
it( "should throw error on empty string as argument to
constructor", function() {
expect( function() {
- uri = new mw.Uri( '' );
+ var uri = new mw.Uri( '' );
} ).toThrow( "Bad constructor arguments" );
} );
it( "should throw error on non-URI as argument to constructor",
function() {
expect( function() {
- uri = new mw.Uri( 'glaswegian penguins' );
+ var uri = new mw.Uri( 'glaswegian penguins' );
} ).toThrow( "Bad constructor arguments" );
} );
it( "should throw error on improper URI as argument to
constructor", function() {
expect( function() {
- uri = new mw.Uri( 'http:/foo.com' );
+ var uri = new mw.Uri( 'http:/foo.com' );
} ).toThrow( "Bad constructor arguments" );
} );
it( "should throw error on URI without protocol as argument to
constructor", function() {
expect( function() {
- uri = new mw.Uri( 'foo.com/bar/baz' );
+ var uri = new mw.Uri( 'foo.com/bar/baz' );
} ).toThrow( "Bad constructor arguments" );
} );
-
} );
} )();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs