         done()
 
     it 'should delete time entries if project is deleted', (done) ->
-      makeProject testUser.id, (p) ->
+      makeProject testUser, (p) ->
         makeTimeEntry = (seed, cb)->
           ops = options()
           ops.body =

testProject = undefined
timeEntriesCreated = []

makeProject = (userId, cb)->
  ops = options()
  ops.body =
    name: 'test project'
    createdDate: new Date()
    userId: userId
  request.post (base '/projects'), ops, (e,r,b)->
    cb b


    startApp ->
      user_test_helper.makeUser (user)->
        testUser = user
        makeProject user, (project)->
          testProject = project
          done()

