 redis     = require './../coffee/db/redis'
 
 data =
+  api: users: require './data/api.users.json'
   steder: require './data/steder.json'
   turer: require './data/turer.json'
 


# Wait for the MongoDB connection to become ready before spinning of any tests.

before (done) -> mongo.once 'ready', done

# Flush cache- and persistand data from Redis and MongoDB.


# > 0. new ObjectID(ObjectID) => new ObjectId()

if not (data['steder'][0]._id instanceof ObjectID)
  for val, key in data.api.users
    data.api.users[key]._id = new ObjectID(val._id['$oid'])
  data.steder[key]._id = new ObjectID(val._id['$oid']) for val, key in data.steder
  data.turer[key]._id = new ObjectID(val._id['$oid']) for val, key in data.turer

