Merge branch 'Alys-v3-buy-health-potion' into api-v3

This commit is contained in:
Blade Barringer
2016-05-16 14:06:02 -05:00
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);