Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | }); |
66 | 66 | |
67 | 67 | test( 'Transformation', function() { |
68 | | - expect(4); |
| 68 | + expect(8); |
69 | 69 | _titleConfig(); |
70 | 70 | |
71 | 71 | var title; |
— | — | @@ -77,7 +77,13 @@ |
78 | 78 | |
79 | 79 | title = new mw.Title( 'User:ABC.DEF' ); |
80 | 80 | equal( title.toText(), 'User:ABC.DEF' ); |
| 81 | + equal( title.getNamespaceId(), 2 ); |
| 82 | + equal( title.getNamespacePrefix(), 'User:' ); |
81 | 83 | |
| 84 | + title = new mw.Title( 'uSEr:hAshAr' ); |
| 85 | + equal( title.toText(), 'User:HAshAr' ); |
| 86 | + equal( title.getNamespaceId(), 2 ); |
| 87 | + |
82 | 88 | title = new mw.Title( ' MediaWiki: Foo bar .js ' ); |
83 | 89 | // Don't ask why, it's the way the backend works. One space is kept of each set |
84 | 90 | equal( title.getName(), 'Foo_bar_.js', "Merge multiple spaces to a single space." ); |