wip(backend): Added control to account
This commit is contained in:
parent
ea885e4e7e
commit
772cf4ffdf
5 changed files with 31 additions and 26 deletions
|
@ -5,6 +5,7 @@ export const accountTests = async (chai, config, expect, store) => {
|
|||
jwt: {
|
||||
bio: "I know it sounds funny but I just can't stand the pain",
|
||||
consent: 1,
|
||||
control: 4,
|
||||
github: 'sorchanidhubhghaill',
|
||||
imperial: true,
|
||||
language: 'es',
|
||||
|
@ -13,6 +14,7 @@ export const accountTests = async (chai, config, expect, store) => {
|
|||
key: {
|
||||
bio: "It's a long way to the top, if you wanna rock & roll",
|
||||
consent: 2,
|
||||
control: 3,
|
||||
github: 'joostdecock',
|
||||
imperial: true,
|
||||
language: 'de',
|
||||
|
|
|
@ -311,31 +311,28 @@ export const personTests = async (chai, config, expect, store) => {
|
|||
})
|
||||
})
|
||||
|
||||
//it(`${store.icon(
|
||||
// 'person',
|
||||
// auth
|
||||
//)} Should clone a person (${auth})`, (done) => {
|
||||
// chai
|
||||
// .request(config.api)
|
||||
// .post(`/people/${store.person[auth].id}/clone/${auth}`)
|
||||
// .set(
|
||||
// 'Authorization',
|
||||
// auth === 'jwt'
|
||||
// ? 'Bearer ' + store.account.token
|
||||
// : 'Basic ' +
|
||||
// new Buffer(
|
||||
// `${store.account.apikey.key}:${store.account.apikey.secret}`
|
||||
// ).toString('base64')
|
||||
// )
|
||||
// .end((err, res) => {
|
||||
// expect(err === null).to.equal(true)
|
||||
// expect(res.status).to.equal(200)
|
||||
// expect(res.body.result).to.equal(`success`)
|
||||
// expect(typeof res.body.error).to.equal(`undefined`)
|
||||
// expect(typeof res.body.person.id).to.equal(`number`)
|
||||
// done()
|
||||
// })
|
||||
//})
|
||||
it(`${store.icon('person', auth)} Should clone a person (${auth})`, (done) => {
|
||||
chai
|
||||
.request(config.api)
|
||||
.post(`/people/${store.person[auth].id}/clone/${auth}`)
|
||||
.set(
|
||||
'Authorization',
|
||||
auth === 'jwt'
|
||||
? 'Bearer ' + store.account.token
|
||||
: 'Basic ' +
|
||||
new Buffer(`${store.account.apikey.key}:${store.account.apikey.secret}`).toString(
|
||||
'base64'
|
||||
)
|
||||
)
|
||||
.end((err, res) => {
|
||||
expect(err === null).to.equal(true)
|
||||
expect(res.status).to.equal(200)
|
||||
expect(res.body.result).to.equal(`success`)
|
||||
expect(typeof res.body.error).to.equal(`undefined`)
|
||||
expect(typeof res.body.person.id).to.equal(`number`)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it(`${store.icon(
|
||||
'person',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue