Skip to content

Commit

Permalink
Fixed test error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
benlowry committed May 21, 2013
1 parent 88419d0 commit 8203131
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/playtomic/as3/TestAchievements.as
Original file line number Diff line number Diff line change
Expand Up @@ -237,22 +237,22 @@ package com.playtomic.as3
// second save gets rejected
Achievements.save(achievement, function(r2:Response):void {
assertFalse(section + "#2", "Request failed", r2.success);
assertEquals(section + "#2", "Already had achievement errorcode", r2.errorcode, 506);
assertEquals(section + "#2", "Already had achievement errorcode", r2.errorcode, 505);

// third save overwrites the first
achievement.overwrite = true;

Achievements.save(achievement, function(r3:Response):void {
assertTrue(section + "#3", "Request succeeded", r3.success);
assertEquals(section + "#3", "Already had achievement errorcode", r3.errorcode, 505);
assertEquals(section + "#3", "Already had achievement errorcode", r3.errorcode, 506);

// fourth saves with allow duplicates
achievement.allowduplicates = true;
delete achievement.overwrite;

Achievements.save(achievement, function(r4:Response):void {
assertTrue(section + "#4", "Request succeeded", r4.success);
assertEquals(section + "#4", "Already had achievement errorcode", r4.errorcode, 505);
assertEquals(section + "#4", "Already had achievement errorcode", r4.errorcode, 506);
done();
});
});
Expand Down

0 comments on commit 8203131

Please sign in to comment.