       $rootScope.model = ""
       $rootScope.$digest()
 
-      element.click()
+      element.triggerHandler "click"
       $rootScope.$digest()
 
       expect($rootScope.model).toBe "12:00 AM"


      changeInputValue = (element, value) ->
        element.val value
        element.trigger (if $sniffer.hasEvent("input") then "input" else "change")

    it "should update the model correctly", ->
      $rootScope.model = ""
      element          = $compile("<mac-time ng-model='model'></mac-time>") $rootScope
      $rootScope.$digest()

      element.click()
      changeInputValue element, "06:25 PM"

      expect($rootScope.model).toBe "06:25 PM"

      element          = $compile("<mac-time ng-model='model'></mac-time>") $rootScope
      $rootScope.$digest()

      element.triggerHandler 'click'
      $rootScope.$digest()

      changeInputValue element, "14:41 AM"
      element.triggerHandler 'blur'
      $rootScope.$digest()

      expect($rootScope.model).toBe("12:00 AM")
