       $rootScope.$digest()
 
       changeInputValue element, "f"
-      expect($(".mac-menu-item").text() == "foo").toBe true
+      expect($(".mac-menu-item").text()).toBe "foo"
 
     it "should use a url string and work exactly like mac-autocomplete-url", ->
       $httpBackend.when("GET", "/api/autocomplete?q=f").respond({data})

      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

    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").toBeFalsy()

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

      $timeout.flush()

      expect($(".mac-menu").hasClass "visible").toBeTruthy()

    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").toBeFalsy()

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

      expect($(".mac-menu").hasClass "visible").toBeFalsy()

  describe "callbacks", ->
    $httpBackend = null
