strongloop/loopback-testing — pull request #26 by clarkorz (2014-08-18 02:54:31+00:00)
Title: Fix built-in models not found

If project doesn't extend built-in models **User** and
**AccessToken** as **user** and **accessToken**, `givenModel()`
can NOT find these models by keys `user` and `accessToken` via
`app.models[key]`.

By capitalizing the keys, `givenModel()` can always find the
proper built-in model.

Note: When `user` model extends `User` model, it will register
both `user` and `User` to `app.models`.

FYI: This doesn't fix the case of extending **User** model with
other name (e.g. **Account**), and **AccessToken** also.

Signed-off-by: Clark Wang