SwiftAvenue/my-city — pull request #7 by bfransen (2014-07-06 17:13:08+00:00)
Title: Recreate integration test with wired in service

Looks like the old integration test worked with Neo4J because we had a completely self contained db connection using the Neo4J ReST service (no grails datasource needed).

When I switched to use the Postgres driver, we started using the grails datasource from the grails infrastructure.

The existing integration test used an annotation to inject the service. I'm not sure why, but the datasource was always wired in as null. This is why at runtime, the groovy sql object could not be instantiated and threw the error of ambiguous constructor. It couldn't figure out which constructor to stuff the null into since it couldn't infer the type from the null.

All I did was regenerate the test class, wire in the service, and run the test.

There were some bugs in one of the queries that were also fixed.