Skip to content

Commit

Permalink
basic tests completed
Browse files Browse the repository at this point in the history
  • Loading branch information
edzzn committed Mar 8, 2018
1 parent 4316172 commit 7b4b3b0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/indexTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,29 @@ describe('Ucuenca Schedule', () => {
done();
});
});
});

describe('Ucuenca Curriculum Progress', () => {
it('Check 0104926787\'s curriculum_progress.', (done) => {
uc.curriculum_progress({ studentId: '0104926787', careerId: 44, curriculumId: 1, careerPlan:4 }, (err, res) => {
const schedulePath = path.join(TEST_RESOURCES, 'curriculum_progress.json');
fs.readFile(schedulePath, 'utf8', function(err, contents) {
const dataExpected = JSON.parse(contents);
expect(res).to.eql(dataExpected);
});
done();
})
});
it('Check invalid student\'s curriculum_progress.', (done) => {
uc.curriculum_progress({ studentId: '1234567890', careerId: 44, curriculumId: 1, careerPlan:4 }, (err, res) => {
const schedulePath = path.join(TEST_RESOURCES, 'curriculum_progress.json');
assert.isEmpty(res);
done();
})
});
});

describe('Ucuenca Authentication', () => {

it('Check wrong password.', (done) => {
uc.authentication({ user: 'edisson.reinozo', passw: 'NotThisOne' }, (err, res) => {
assert.isFalse(res[0]['Autenticacion']);
Expand Down

0 comments on commit 7b4b3b0

Please sign in to comment.