You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
487 B

  1. semantic.api = {};
  2. // ready event
  3. semantic.api.ready = function() {
  4. var
  5. headers = {
  6. 'Content-Type': 'application/json'
  7. },
  8. method = 'GET',
  9. responseCode = 200,
  10. body = '{ "success": "true" }',
  11. server = sinon.fakeServer.create()
  12. ;
  13. server.autoRespond = true;
  14. server.autoRespondAfter = 500;
  15. server
  16. .respondWith(method, '/api/follow/5209', [responseCode, headers, body])
  17. ;
  18. };
  19. // attach ready event
  20. $(document)
  21. .ready(semantic.api.ready)
  22. ;