@@ -2,47 +2,10 @@ import GuidAutoLocation from 'ember-osf-web/locations/auto';
22import { setupTest } from 'ember-qunit' ;
33import { module , test } from 'qunit' ;
44
5- const TEST_CASES = [ {
6- input : '/--user/abcd/' ,
7- output : '/abcd/' ,
8- } , {
9- input : '/--user/abcd' ,
10- output : '/abcd' ,
11- } , {
12- input : '/--user/--nested/abcd/' ,
13- output : '/abcd/' ,
14- } , {
15- input : '/--registries-engine/overview/' ,
16- output : '/overview/' ,
17- } , {
18- input : '/collections/--something--else/here/' ,
19- output : '/collections/here/' ,
20- } , {
21- input : '/--registries/' ,
22- output : '/' ,
23- } , {
24- input : '/AttheEnd/--registries/' ,
25- output : '/AttheEnd/' ,
26- } , {
27- input : '/AttheEnd/--registries' ,
28- output : '/AttheEnd' ,
29- } , {
30- input : '/normal--url/' ,
31- output : '/normal--url/' ,
32- } ] ;
33-
345module ( 'Unit | Location | guid-auto ' , hooks => {
356 setupTest ( hooks ) ;
367
378 test ( 'it exists' , function ( assert ) {
389 assert . ok ( this . owner . lookup ( 'location:auto' ) instanceof GuidAutoLocation ) ;
3910 } ) ;
40-
41- test ( 'cleanURL' , function ( assert ) {
42- const location = this . owner . lookup ( 'location:auto' ) as GuidAutoLocation ;
43-
44- for ( const testCase of TEST_CASES ) {
45- assert . equal ( location . cleanURL ( testCase . input ) , testCase . output ) ;
46- }
47- } ) ;
4811} ) ;
0 commit comments