diff --git a/src/test/id2str.js b/src/test/id2str.js index 0a52858b5673c51ad8172a57be2257b17b3e1eb6..153768988421d52127e8ff7f3f9a9b0d5800d4d2 100644 --- a/src/test/id2str.js +++ b/src/test/id2str.js @@ -45,6 +45,8 @@ describe('id2str middleware', () => { it('should transform a location id', (done) => { expect(id2str.location(6)).to.deep.equal('Unidade de uso sustentável'); + expect(id2str.location(4)).to.deep.equal('Terra indÃgena'); + expect(id2str.location(5)).to.deep.equal('Ãrea remanescente de quilombos'); done(); }); @@ -53,6 +55,12 @@ describe('id2str middleware', () => { done(); }); + + it('should transform a income level id', (done) => { + expect(id2str.incomeLevel(1)).to.deep.equal('1º quintil – 20% menores'); + done(); + }); + it('should transform a class adm dependency id', (done) => { expect(id2str.admDependency(6)).to.deep.equal('Não classificada'); done(); @@ -60,6 +68,7 @@ describe('id2str middleware', () => { it('should transform a class adm dependency priv id', (done) => { expect(id2str.admDependencyPriv(7)).to.deep.equal('Não classificada'); + done(); }); @@ -67,7 +76,7 @@ describe('id2str middleware', () => { let req = { result: [{gender_id: 2, period_id: 3, school_year_id: 11}] }; - id2str.transform(false)(req, {}, (error)=>{ + id2str.transform(false)(req, {}, (error)=> { if (error) { throw new Error('Expected not to receive an error'); } req.should.have.property('result'); req.result.should.not.be.undefined;