       element = $compile("<mac-autocomplete ng-model='test' mac-autocomplete-source='source'></mac-autocomplete>") $rootScope
       $rootScope.$digest()
 
-      expect($(".mac-menu").hasClass "visible").toBe false
-
-      changeInputValue element, "f"
-      $rootScope.$digest()
-
-      $timeout.flush()
-
-      expect($(".mac-menu").hasClass "visible").toBe true
+      expect($(".mac-menu").hasClass "visible").toBeFalsy()
+
+      changeInputValue element, "f"
+      $rootScope.$digest()
+
+      $timeout.flush()
+
+      expect($(".mac-menu").hasClass "visible").toBeTruthy()
 
     it "should delay for 200ms", ->
       $rootScope.source = data

      element = $compile("<mac-autocomplete ng-model='test' mac-autocomplete-source='source' mac-autocomplete-delay='200'></mac-autocomplete>") $rootScope
      $rootScope.$digest()

      expect($(".mac-menu").hasClass "visible").toBe false

      changeInputValue element, "f"
      $rootScope.$digest()

      $timeout.flush()

      expect($(".mac-menu").hasClass "visible").toBe true

    it "should disable autocomplete", ->
      $rootScope.disabled = true
      element             = $compile("<mac-autocomplete ng-model='test' mac-autocomplete-disabled='disabled'></mac-autocomplete>") $rootScope
      $rootScope.$digest()

      expect($(".mac-menu").hasClass "visible").toBe false

      changeInputValue element, "f"
      $rootScope.$digest()

      expect($(".mac-menu").hasClass "visible").toBe false

  describe "callbacks", ->
    $httpBackend = null

      $timeout.flush()
      $httpBackend.flush()

      expect($rootScope.error).toHaveBeenCalled()

  describe "model -> view", ->
    it "should update the view", ->
