@@ -80,7 +80,8 @@ describe('docker-registry-frontend', function() {
8080
8181 it ( 'URL with repositoryUser and repositoryName and tagsPerPage should display repository detail page' , function ( ) {
8282 $httpBackend . expectGET ( 'repository/repository-detail.html' ) . respond ( 200 ) ;
83- $location . path ( '/repository/owner/name/10' ) ;
83+ $location . path ( '/repository/owner/name' ) ;
84+ $location . search ( 'tagsPerPage' , 10 )
8485 $rootScope . $digest ( ) ;
8586 expect ( $route . current . templateUrl ) . toBe ( 'repository/repository-detail.html' ) ;
8687 expect ( $route . current . controller ) . toBe ( 'RepositoryDetailController' ) ;
@@ -91,9 +92,6 @@ describe('docker-registry-frontend', function() {
9192 expect ( scope . repository ) . toBe ( 'owner/name' ) ;
9293 } ) ;
9394
94- // This test currently fails; this URL is incorrectly routing to the home page
95- // @todo @FIXME
96- //
9795 it ( 'URL with repositoryName but no repositoryUser and no tagsPerPage should display repository detail page' , function ( ) {
9896 $httpBackend . expectGET ( 'repository/repository-detail.html' ) . respond ( 200 ) ;
9997 $location . path ( '/repository/cx' ) ;
@@ -104,15 +102,16 @@ describe('docker-registry-frontend', function() {
104102
105103 it ( 'URL with repositoryName but no repositoryUser and tagsPerPage should display repository detail page' , function ( ) {
106104 $httpBackend . expectGET ( 'repository/repository-detail.html' ) . respond ( 200 ) ;
107- $location . path ( '/repository/cx/10' ) ;
105+ $location . path ( '/repository/cx' ) ;
106+ $location . search ( 'tagsPerPage' , 10 )
108107 $rootScope . $digest ( ) ;
109108 expect ( $route . current . templateUrl ) . toBe ( 'repository/repository-detail.html' ) ;
110109 expect ( $route . current . controller ) . toBe ( 'RepositoryDetailController' ) ;
111110 var scope = { } ;
112111 $controller ( 'RepositoryDetailController' , { $scope : scope } ) ;
113- // expect(scope.repositoryUser).toBeUndefined();
114- // expect(scope.repositoryName).toBe('cx');
115- // expect(scope.repository).toBe('cx');
112+ expect ( scope . repositoryUser ) . toBeUndefined ( ) ;
113+ expect ( scope . repositoryName ) . toBe ( 'cx' ) ;
114+ expect ( scope . repository ) . toBe ( 'cx' ) ;
116115 } ) ;
117116
118117 it ( '/about should display about page' , function ( ) {
0 commit comments