CUL-DigitalServices/avocet-hilary — pull request #25 by Coenego (2014-04-15 09:12:28+00:00)
Title: Added ZenDesk module

Avocet ZenDesk module, refactored to OAE standards, based on @ucamhal's [branch](https://github.com/ucamhal/avocet-hilary/tree/avocet/tickets-zendesk).

### Creating tickets
A ZenDesk ticket is generated (if enabled in the admin) when a `CREATED_TICKET` event is dispatched from the `oae-tickets` module. This event carries the **current context** and the **created OAE ticket**.

When the `createZenDeskTicket` method is called, the following steps are executed:
1. create a new ZenDesk client
2. retrieve the current user profile
3. retrieve the corresponding publication details
4. create a new ZenDesk user (or return an existing one)
5. create a new ZenDesk ticket

### Testing
To test the `oae-tickets-zendesk` module, a mock Express server is set up during the tests. This server will mock the user creation/search and the ticket retrieval.