 
       pageTitleFactory.setTitle title
 
-      expect($scope.pageTitle).toContain title+      expect($scope.pageTitle).toContain title
+
+    it 'should hide the loader when an event is fired from pageLoaderFactory', () ->
+      controller = createController()
+
+      $scope.handleViewLoaded()
+
+      expect($scope.hideLoader).toBe true
  'config'
  'angular'
  'controller/app-controller'
  'factory/page-title-factory'
], (cfg, A) ->
  describe 'App controller', () ->
    $scope = null
    createController = null
    pageTitleFactory = null

    beforeEach module cfg.ngApp

    beforeEach inject ($injector) ->
      $controller = $injector.get '$controller'
      $rootScope = $injector.get '$rootScope'
      pageLoaderFactory = $injector.get 'pageLoaderFactory'
      pageTitleFactory = $injector.get 'pageTitleFactory'

      $scope = $rootScope.$new()
