added tests for the database state after devices are registered

Signed-off-by: Floyd Pink <imbleedingme@googlemail.com>
tests for PUT /devices/:deviceId/repos/:repoId

Signed-off-by: Floyd Pink <imbleedingme@googlemail.com>
some proxyquire mocking into the tests... this is awesome

Signed-off-by: Floyd Pink <imbleedingme@googlemail.com>