 startApp = require './../start_app'
 base = require './../base'
 options = require './../options'
+user_test_helper = require './user_test_helper'
 
 validProject = (p)->
   p.should.have.property 'name'

describe 'Projects', ->
  before (done) ->
    startApp ->
      createTestUser (e, id)->
        testUserId = id
        testProjects = _.map testProjects, (p)->
          p.createdDate = new Date()
          p.userId = id
          return p
        async.each testProjects, createProject, done

  after (done) ->
    async.each projectsCreated, deleteProject, ->
      ops = options()
      request.del (base "/users/#{testUserId}"), ops, (e,r,b)->
        r.statusCode.should.be.equal 200
        done()



testProjects = [ {name: 'p1'}, {name: 'p2'} ]

testUser = undefined
projectsCreated = []

createProject = (project, callback)->
  ops = options()
