Add assertions for correctly mapping V1 properties

This commit is contained in:
Alasdair Smith
2017-11-20 11:23:02 +00:00
parent 24166af90e
commit 9a96f070d5
@@ -314,6 +314,13 @@ describe "ProjectController", ->
it 'should include V1 projects', (done) ->
@res.render = (pageName, opts) =>
opts.projects.length.should.equal (@projects.length + @collabertions.length + @readOnly.length + @V1Response.projects.length)
opts.projects.forEach (p) ->
# Check properties correctly mapped from V1
expect(p).to.have.property 'id'
expect(p).to.have.property 'name'
expect(p).to.have.property 'lastUpdated'
expect(p).to.have.property 'accessLevel'
expect(p).to.have.property 'archived'
done()
@ProjectController.projectListPage @req, @res