|
|
|
@ -43,6 +43,14 @@ test('Hero onboard test', async (t) => {
@@ -43,6 +43,14 @@ test('Hero onboard test', async (t) => {
|
|
|
|
|
|
|
|
|
|
assert.equal(response.status, 200); |
|
|
|
|
assert.equal(response.data.code, 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
params.name = 'test_hero_2'; |
|
|
|
|
const response2 = await axios.post(api, params, axiosConfig); |
|
|
|
|
console.log(response2.data); |
|
|
|
|
|
|
|
|
|
assert.equal(response2.status, 200); |
|
|
|
|
assert.equal(response2.data.code, 1); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('HeroUnion stats test', async (t) => { |
|
|
|
@ -51,5 +59,14 @@ test('HeroUnion stats test', async (t) => {
@@ -51,5 +59,14 @@ test('HeroUnion stats test', async (t) => {
|
|
|
|
|
const response = await axios.get(api, axiosConfig); |
|
|
|
|
console.log(response.data); |
|
|
|
|
|
|
|
|
|
assert.equal(response.status, 200); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('HeroUnion get heros test', async (t) => { |
|
|
|
|
let api = 'http://127.0.0.1:8080/api/heros/'; |
|
|
|
|
|
|
|
|
|
const response = await axios.get(api, axiosConfig); |
|
|
|
|
console.log(response.data); |
|
|
|
|
|
|
|
|
|
assert.equal(response.status, 200); |
|
|
|
|
}); |