1
0
Fork 0

fix(backend): Proper import of archived repo

Not really sure what happened, but clearly when I imported our backend
code into our monorepo, it was not the latest version.

So I'm fixing this now by putting in the latest code. I will re-apply
the changes since later.
This commit is contained in:
Joost De Cock 2022-01-01 15:18:27 +01:00
parent bcfb919172
commit ca8ceb1a30
90 changed files with 4337 additions and 2693 deletions

View file

@ -0,0 +1,31 @@
module.exports = function tests(store, config, chai) {
describe('Admin routes', () => {
it('should login ad admin', done => {
chai
.request(config.backend)
.post('/login')
.send({
username: 'admin',
password: 'admin'
})
.end((err, res) => {
console.log(res)
res.should.have.status(200)
done()
})
})
it('should load a user account', done => {
chai
.request(config.backend)
.get('/admin/users/rracx')
.set('Authorization', 'Bearer ' + config.user.token)
.end((err, res) => {
res.should.have.status(200)
let data = JSON.parse(res.text)
console.log(data)
done()
})
})
})
}