Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('Provider Model Tests:', () => {
- describe('Testing the save method', () => {
- it('Should be able to save without problems', (done) => {
- const provider = new Provider({
- name: 'Provider N1',
- phone: '+123 12 32 11',
- })
- provider.save((err) => {
- should.not.exist(err)
- done()
- })
- })
- it('Should not be able to save a provider without name', (done) => {
- const provider = new Provider({
- name: '',
- phone: '+123 12 32 11',
- })
- provider.save((err) => {
- should.exist(err)
- done()
- })
- })
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment