rename buyPotion and buy-potion to buyHealthPotion and buy-health-potion; fix apidoc param error

This commit is contained in:
Alys
2016-05-16 23:15:01 +10:00
parent ad03cc8f9a
commit daa0955ac1
8 changed files with 24 additions and 26 deletions
@@ -18,7 +18,7 @@ describe('POST /user/buy-armoire', () => {
// More tests in common code unit tests
it('returns an error if user does not have enough gold', async () => {
await expect(user.post('/user/buy-potion'))
await expect(user.post('/user/buy-health-potion'))
.to.eventually.be.rejected.and.eql({
code: 401,
error: 'NotAuthorized',
@@ -32,7 +32,7 @@ describe('POST /user/buy-armoire', () => {
});
let potion = content.potion;
let res = await user.post('/user/buy-potion');
let res = await user.post('/user/buy-health-potion');
await user.sync();
expect(user.stats.hp).to.equal(50);
@@ -6,7 +6,7 @@ import shared from '../../../../../common/script';
let content = shared.content;
describe('POST /user/buy-potion', () => {
describe('POST /user/buy-health-potion', () => {
let user;
beforeEach(async () => {
@@ -18,7 +18,7 @@ describe('POST /user/buy-potion', () => {
// More tests in common code unit tests
it('returns an error if user does not have enough gold', async () => {
await expect(user.post('/user/buy-potion'))
await expect(user.post('/user/buy-health-potion'))
.to.eventually.be.rejected.and.eql({
code: 401,
error: 'NotAuthorized',
@@ -32,7 +32,7 @@ describe('POST /user/buy-potion', () => {
});
let potion = content.potion;
let res = await user.post('/user/buy-potion');
let res = await user.post('/user/buy-health-potion');
await user.sync();
expect(user.stats.hp).to.equal(50);