Index: trunk/phase3/tests/qunit/suites/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -83,6 +83,7 @@ |
84 | 84 | 'edit': '/edit/$1' |
85 | 85 | }); |
86 | 86 | |
| 87 | + equal( mw.util.getActionFrom( urlB ), 'edit', 'action-parameter support with action path' ); |
87 | 88 | equal( mw.util.getActionFrom( urlC ), 'edit', 'wgActionPaths support' ); |
88 | 89 | |
89 | 90 | // Default settings |
— | — | @@ -90,6 +91,7 @@ |
91 | 92 | 'wgActionPaths': [], |
92 | 93 | 'wgArticlePath': '/w/index.php/$1' |
93 | 94 | }); |
| 95 | + equal( mw.util.getActionFrom( urlB ), 'edit', 'action-parameter support with default settings' ); |
94 | 96 | equal( mw.util.getActionFrom( urlD ), 'view', 'wgArticlePath (/index.php/$1) support' ); |
95 | 97 | |
96 | 98 | }); |
— | — | @@ -109,14 +111,15 @@ |
110 | 112 | }); |
111 | 113 | |
112 | 114 | equal( mw.util.getTitleFrom( urlA ), 'Article', 'wgArticlePath (/wiki/$1) support' ); |
113 | | - equal( mw.util.getTitleFrom( urlB ), 'Article', 'action-parameter support' ); |
| 115 | + equal( mw.util.getTitleFrom( urlB ), 'Article', 'title-parameter support' ); |
114 | 116 | |
115 | 117 | // Custom settings |
116 | 118 | mw.config.set( 'wgActionPaths', { |
117 | 119 | 'view': '/view/$1', |
118 | 120 | 'edit': '/edit/$1' |
119 | 121 | }); |
120 | | - |
| 122 | + |
| 123 | + equal( mw.util.getTitleFrom( urlB ), 'Article', 'title-parameter support with action path' ); |
121 | 124 | equal( mw.util.getTitleFrom( urlC ), 'Article', 'wgActionPaths support' ); |
122 | 125 | |
123 | 126 | // Default settings |
— | — | @@ -125,6 +128,7 @@ |
126 | 129 | 'wgArticlePath': '/w/index.php/$1' |
127 | 130 | }); |
128 | 131 | |
| 132 | + equal( mw.util.getTitleFrom( urlB ), 'Article', 'title-parameter support with default settings' ); |
129 | 133 | equal( mw.util.getTitleFrom( urlD ), 'Article', 'wgArticlePath (/index.php/$1) support' ); |
130 | 134 | |
131 | 135 | }); |