@@ -313,41 +313,4 @@ describe('Unit tests for profile controller', function () {
313313 expect ( $rootScope . notify ) . toHaveBeenCalledWith ( "error" , errorResponse . error ) ;
314314 } ) ;
315315 } ) ;
316-
317- describe ( 'Unit tests for isURLValid function' , function ( ) {
318- it ( 'should allow empty URLs' , function ( ) {
319- var result = vm . isURLValid ( '' ) ;
320- expect ( result ) . toBeTruthy ( ) ;
321-
322- result = vm . isURLValid ( null ) ;
323- expect ( result ) . toBeTruthy ( ) ;
324-
325- result = vm . isURLValid ( undefined ) ;
326- expect ( result ) . toBeTruthy ( ) ;
327- } ) ;
328-
329- it ( 'should return true for valid URLs within 200 characters' , function ( ) {
330- var result = vm . isURLValid ( 'https://github.com' ) ;
331- expect ( result ) . toBeTruthy ( ) ;
332-
333- result = vm . isURLValid ( 'http://example.com/path?query=param' ) ;
334- expect ( result ) . toBeTruthy ( ) ;
335-
336- result = vm . isURLValid ( 'https://sub.domain.example.com/long-path/to/resource?query=1&more=2' ) ;
337- expect ( result ) . toBeTruthy ( ) ;
338- } ) ;
339-
340- it ( 'should return false for invalid URLs or overly long ones' , function ( ) {
341- var result = vm . isURLValid ( 'invalid-url' ) ;
342- expect ( result ) . toBeFalsy ( ) ;
343-
344- result = vm . isURLValid ( 'htp://missing-schema.com' ) ;
345- expect ( result ) . toBeFalsy ( ) ;
346-
347- var longUrl = 'http://example.com/' + 'a' . repeat ( 201 ) ;
348- result = vm . isURLValid ( longUrl ) ;
349- expect ( result ) . toBeFalsy ( ) ;
350- } ) ;
351- } ) ;
352-
353316} ) ;
0 commit comments