Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #51

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
});
});
});