balderdashy/sails-postgresql — pull request #124 by DavidEBest (2014-12-08 21:51:00+00:00)
Title: Updating unit tests to use waterline-sequel generated queries.

This PR only changes the library code in one location: buildSchema in utils.js was updated to upgrade fields specified as strings to objects.

i.e.
```
user_id: integer -> user_id: { type: integer }
```
All other changes are purely within the unit tests. This corrects the majority of the tests, but there are still 6 that fail.
All of the current failures (save one) are actual unit test failures.

### 1 & 2: adapter.groupBy ###
These tests both return
_Error: An aggregation was used but no calculations were given_
because they include group by, but do not include an aggregation. It could be resolved by adding an aggregation, but I didn't want to change the scope of the test like that if it wasn't included at the beginning. There is an integration test that covers the throwing of that Error.

### 3: adapter.joins ###
A bit of a punt. I didn't update this file; the populate join test still needs work to get SQL out that looks similar to what is expected.

### 4: query.skip ###
The query adds an unexpected `LIMIT 184467440737095516` to the query that (I believe) should be removed.

### 5 & 6: query.where ###
`query .where() 'LIKE' criteria should build a SELECT statement with ILIKE`
`query .where() 'OR' criteria should build a SELECT statement with multiple like statements`
Both of these use LIKE instead of the ILIKE comparator.