Skip to content

Commit

Permalink
Merge pull request #51 from innovativeinnovation/fix-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed Aug 12, 2021
2 parents 2b34926 + 766efbf commit cc9ecbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 8 additions & 6 deletions test/test-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ require('chai').should();

const epflPeopleApi = require('../src/index.js');

describe('epfl-people-api findByEmail', () => {
describe('epfl-people-api findByEmail', function () {
this.timeout(10000);

it('should throw an exception with email xxx', () => {
return epflPeopleApi.findByEmail('xxx', 'en').then(() => {
}).catch((err) => err.message.should.equal('Expected an email'));
Expand All @@ -35,13 +37,13 @@ describe('epfl-people-api findByEmail', () => {
});
});

it('should find email gregory.charmier@epfl.ch', () => {
it('should find email yves.junod@epfl.ch', () => {
return epflPeopleApi.findByEmail(
'gregory.charmier@epfl.ch'
'yves.junod@epfl.ch'
).then((res) => {
res.name.should.equal('Charmier');
res.firstname.should.equal('Grégory');
res.office.should.equal('INN 013');
res.name.should.equal('Junod');
res.firstname.should.equal('Yves');
res.office.should.equal('MA B0 449');
});
});
});
10 changes: 5 additions & 5 deletions test/test-sciper.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ describe('epfl-people-api findBySciper', function () {
});
});

it('should find sciper 188475', function () {
return epflPeopleApi.findBySciper(188475, undefined).then((res) => {
res.name.should.equal('Charmier');
res.firstname.should.equal('Grégory');
res.office.should.equal('INN 013');
it('should find sciper 160781', function () {
return epflPeopleApi.findBySciper(160781, undefined).then((res) => {
res.name.should.equal('Junod');
res.firstname.should.equal('Yves');
res.office.should.equal('MA B0 449');
});
});
});

0 comments on commit cc9ecbf

Please sign in to comment.