-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove 2 duplicated fields from join us validation schema * Test post join us api
- Loading branch information
1 parent
225439b
commit d6829c9
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const chai = require('chai'); | ||
const { expect } = require('chai'); | ||
const chaiHttp = require('chai-http'); | ||
const server = require('../../../index'); | ||
|
||
chai.use(chaiHttp); | ||
|
||
describe('Test for post join us requests:', () => { | ||
it('post join us requests to /joinus', (done) => { | ||
const joinUsData = { | ||
name: 'hazem', | ||
email: '[email protected]', | ||
linkdin: 'https://www.linkedin.com/in/test', | ||
description: 'This is just for test', | ||
year: '4th', | ||
college: 'Test University', | ||
contact: '0123456789', | ||
interestedDomain: ['Backend'], | ||
department: 'CS', | ||
}; | ||
chai | ||
.request(server) | ||
.post('/joinUs') | ||
.send(joinUsData) | ||
.then((res) => { | ||
expect(res.status).to.equal(200); | ||
done(); | ||
}) | ||
.catch(done); | ||
}); | ||
}); |