v3: fix build and ios IAP

This commit is contained in:
Matteo Pagliazzi
2016-05-19 21:18:43 +02:00
parent c8f55302ca
commit c6da283b54
2 changed files with 6 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ describe('GET challenges/user', () => {
}); });
expect(foundChallenge.group).to.eql({ expect(foundChallenge.group).to.eql({
_id: publicGuild._id, _id: publicGuild._id,
id: publicGuild._id,
type: publicGuild.type, type: publicGuild.type,
privacy: publicGuild.privacy, privacy: publicGuild.privacy,
name: publicGuild.name, name: publicGuild.name,
@@ -58,6 +59,7 @@ describe('GET challenges/user', () => {
}); });
expect(foundChallenge1.group).to.eql({ expect(foundChallenge1.group).to.eql({
_id: publicGuild._id, _id: publicGuild._id,
id: publicGuild._id,
type: publicGuild.type, type: publicGuild.type,
privacy: publicGuild.privacy, privacy: publicGuild.privacy,
name: publicGuild.name, name: publicGuild.name,
@@ -71,6 +73,7 @@ describe('GET challenges/user', () => {
}); });
expect(foundChallenge2.group).to.eql({ expect(foundChallenge2.group).to.eql({
_id: publicGuild._id, _id: publicGuild._id,
id: publicGuild._id,
type: publicGuild.type, type: publicGuild.type,
privacy: publicGuild.privacy, privacy: publicGuild.privacy,
name: publicGuild.name, name: publicGuild.name,
@@ -89,6 +92,7 @@ describe('GET challenges/user', () => {
}); });
expect(foundChallenge1.group).to.eql({ expect(foundChallenge1.group).to.eql({
_id: publicGuild._id, _id: publicGuild._id,
id: publicGuild._id,
type: publicGuild.type, type: publicGuild.type,
privacy: publicGuild.privacy, privacy: publicGuild.privacy,
name: publicGuild.name, name: publicGuild.name,
@@ -102,6 +106,7 @@ describe('GET challenges/user', () => {
}); });
expect(foundChallenge2.group).to.eql({ expect(foundChallenge2.group).to.eql({
_id: publicGuild._id, _id: publicGuild._id,
id: publicGuild._id,
type: publicGuild.type, type: publicGuild.type,
privacy: publicGuild.privacy, privacy: publicGuild.privacy,
name: publicGuild.name, name: publicGuild.name,

View File

@@ -130,7 +130,7 @@ api.iapiOSVerify = {
if (purchaseDataList.length > 0) { if (purchaseDataList.length > 0) {
let correctReceipt = true; let correctReceipt = true;
for (let index of purchaseDataList) { for (let index in purchaseDataList) {
switch (purchaseDataList[index].productId) { switch (purchaseDataList[index].productId) {
case 'com.habitrpg.ios.Habitica.4gems': case 'com.habitrpg.ios.Habitica.4gems':
payments.buyGems({user, paymentMethod: 'IAP AppleStore', amount: 1}); payments.buyGems({user, paymentMethod: 'IAP AppleStore', amount: 1});