carrot/roots-cms — pull request #5 by joshrowley (2014-01-13 22:14:21+00:00)
Title: Tests && API Redesign / Refactor

- Tests for API endpoint, `Content` and `ContentLoader`

- Major redesign of API: The API endpoint for listing all content is now at `/api/content`. I redesigned the API to no longer be in charge of sorting the different pieces of content into separate JSON objects sorted by their parent directory, instead it returns a list of all content. This removes the need for the janky [custom Marionette logic](https://github.com/carrot/roots-cms/blob/develop/assets/js/main.coffee#L17-L26) that parses the API and loads multiple ContentCollections. Instead, there will be one ContentCollection that contains all the content, that we then filter and sort on the client to display a similar UI as before.