         expect(@sut.errorMessage).to.equal 'ERROR'
 
 
-        
-    
+
+

      it 'should call AuthenticatorService.authenticate with the email and password', ->
        expect(@AuthenticatorService.authenticate).to.have.been.calledWith 'r@go.co', 'sliced'

    describe 'when called and authenticate throws an error', ->
      beforeEach ->
        @AuthenticatorService.authenticate.returns @q.reject('ERROR')
        @sut.login 'r@go.co', 'sliced'
        @rootScope.$digest()


      @AuthenticatorService = authenticate: sinon.stub().returns @q.when()
      @sut = $controller 'LoginController',
        AuthenticatorService: @AuthenticatorService
      @sut.loginForm =
        $valid: true
        email: {'$setTouched': =>}
        password: {'$setTouched': =>}

  describe '->login', ->
    describe 'when called with a email and password', ->
