ProjectDetailsHandler.getDetails does not need full project

This commit is contained in:
Henry Oswald 2016-02-26 07:56:26 +00:00
parent 09ac8f8c7a
commit 447568aa91
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ _ = require("underscore")
module.exports =
getDetails: (project_id, callback)->
ProjectGetter.getProjectWithoutDocLines project_id, (err, project)->
ProjectGetter.getProject project_id, {name:1, description:1, compiler:1, features:1, owner_ref:1}, (err, project)->
if err?
logger.err err:err, project_id:project_id, "error getting project"
return callback(err)

View file

@ -5,7 +5,7 @@ sinon = require('sinon')
assert = require("chai").assert
require('chai').should()
describe 'Project details handler', ->
describe 'ProjectDetailsHandler', ->
beforeEach ->
@project_id = "321l3j1kjkjl"
@ -50,7 +50,7 @@ describe 'Project details handler', ->
it "should return the error", (done)->
error = "some error"
@ProjectGetter.getProjectWithoutDocLines.callsArgWith(1, error)
@ProjectGetter.getProject.callsArgWith(2, error)
@handler.getDetails @project_id, (err)=>
err.should.equal error
done()