[Mobile] Tests

Has way to make isMobile call
true or false for mobile/nonmobile
devices.
This commit is contained in:
Shivam Dave
2015-07-29 15:06:39 -07:00
parent 12ec293f3d
commit 906354764b
2 changed files with 55 additions and 2 deletions

View File

@@ -75,6 +75,19 @@ define(
mockDomainObject.calls
);
});
it("mobile", function () {
mockQueryService.isMobile.andReturn(true);
gesture = new ContextMenuGesture(mockTimeout, mockQueryService, mockElement, mockDomainObject);
// Capture the contextmenu callback
fireGesture = mockElement.on.mostRecentCall.args[1];
expect(mockElement.on).toHaveBeenCalledWith(
"touchstart",
jasmine.any(Function)
);
});
});
}
);