public.endpoint.test.js 662 Bytes
Newer Older
Rosanny Sihombing's avatar
Rosanny Sihombing committed
1
const request = require('supertest')
Rosanny Sihombing's avatar
Rosanny Sihombing committed
2
const app = require('../src/app')
Rosanny Sihombing's avatar
Rosanny Sihombing committed
3
4

describe('Test endpoint(s)', () => {
Rosanny Sihombing's avatar
Rosanny Sihombing committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  it('should return a 200 status code', () => {
    request(app)
      .get('/registration')
      .expect(200)
      .end(function (err, res) {
        if (err) throw err
      })
  })
  it('should return a 200 status code', () => {
    request(app)
      .get('/forgotPwd')
      .expect(200)
      .end(function (err, res) {
        if (err) throw err
      })
  })
Rosanny Sihombing's avatar
Rosanny Sihombing committed
21
22
23
24
25
26
27
28
29
  it('should return a 200 status code', () => {
    request(app)
      .get('/contact')
      .expect(200)
      .end(function (err, res) {
        if (err) throw err
      })
  })
})