~akiva/user-profiles-api-demo

4f8bdb9d52cc0b9f7a1e2a65b5feb271eb489a5e — Akiva Levy 2 years ago 9358d9a master
Fix authorization header typo in tests
2 files changed, 3 insertions(+), 3 deletions(-)

M lib/auth/controller.test.js
M lib/users/controller.test.js
M lib/auth/controller.test.js => lib/auth/controller.test.js +2 -2
@@ 146,7 146,7 @@ test('Auth controller', function (t) {
      st.plan(2)
      const response = res()
      const ctrlr = controller(req({
        headers: { 'Authorization': 'Bearer 123' },
        headers: { 'authorization': 'Bearer 123' },
      }), response)
      ctrlr.verifyToken(() => {})
        .catch(e => {


@@ 172,7 172,7 @@ test('Auth controller', function (t) {
        .then(user => {
          const request = req({
            headers: {
              'Authorization': 'Bearer ' + JSON.parse(user).accessToken
              'authorization': 'Bearer ' + JSON.parse(user).accessToken
            },
          })
          return controller(request, res())

M lib/users/controller.test.js => lib/users/controller.test.js +1 -1
@@ 34,7 34,7 @@ function authenticateUser(user, req, res) {
      }
      return authController(req, res).login()
    })
    .then(user => req.headers['Authorization'] =
    .then(user => req.headers['authorization'] =
      'Bearer ' + JSON.parse(user).accessToken
    )
}