     @datastoreFactory =
       build: (collection) =>
         new Datastore
-          database: 'meshblu-core-test'
+          database: @databaseUri
           collection: collection
 
     @cacheFactory =

    describe 'when called with an CheckToken job', ->
      beforeEach (done) ->
        datastore = new Datastore
          database: 'meshblu-core-test'
          collection: 'devices'

        record =


describe 'QueueWorker', ->
  beforeEach ->
    mongoHost = process.env.MONGODB_HOST ? 'localhost'
    mongoPort = process.env.MONGODB_PORT ? '27017'
    @databaseUri = "#{mongoHost}:#{mongoPort}/meshblu-core-test"

    @clientId = uuid.v1()
    @cacheClientId = uuid.v1()
    @client = _.bindAll redis.createClient @clientId
