source: DASISH/t5.6/client/branches/webannotator-basic-current-xsd/chrome/markingcollection/content/markingcollection/annotator-service/test/mockjax/mockjax-helper.txt @ 5703

Last change on this file since 5703 was 5703, checked in by stephanie.roth@snd.gu.se, 10 years ago

Initial commit of current status quo from GitHub. TODO: Adjust client code to work with updated xsd file.

  • Property svn:executable set to *
File size: 876 bytes
Line 
1/* https://github.com/appendto/jquery-mockjax/blob/master/README.md */
2
3/* Set up mocks */
4
5$.mockjax(options); /* Sets up a mockjax handler. */
6
7/* options */
8/* responseXML: A string specifying the mocked XML for the request. */
9/* proxy: A string specifying a path to a file, from which the contents will be returned for the request. */
10/* etag: A string specifying a unique identifier referencing a specific version of the requested data.
11 * This is used by $.ajax to determine if the requested data is new since the last request. (see HTTP_ETag) */
12
13/* Remove mocks */
14
15$.mockjaxClear(); /* Removes all mockjax handlers. */
16
17$.mockjaxClear(id); /* Remove a single mockjax handler. id is the string returned from $.mockjax. */
18
19/* Return mocks */
20$.mockjax.mockedAjaxCalls(); /* Returns all mocked ajax calls so you can e.g. check that expected data is sent to backend. */
Note: See TracBrowser for help on using the repository browser.