Skip to content
Browse files

Adding basic test for Wowhead fallback.

  • Loading branch information...
1 parent 705e248 commit a5b07ec37bcb232fef630d17899e85992e91ffda @xtian committed Mar 4, 2012
Showing with 13 additions and 3 deletions.
  1. +2 −1 package.json
  2. +11 −2 tests/item.test.js
View
3 package.json
@@ -17,7 +17,8 @@
},
"devDependencies": {
"tap": "~0.2.0",
- "jshint": "~0.5.0"
+ "jshint": "~0.5.0",
+ "wowhead": "~0.1.0"
},
"scripts": {
"test": "make test"
View
13 tests/item.test.js
@@ -1,5 +1,5 @@
var test = require('tap').test,
- armory = require('../').defaults({ region: 'us' });
+ armory = require('../').defaults({ region: 'us', fallback: false });
test('single item', function(test) {
armory.item(27987, function(err, item) {
@@ -15,4 +15,13 @@ test('non-existent item', function(test) {
test.ok(err);
test.end();
});
-});
+});
+
+test('4.3 item', function(test) {
+ armory.item({ id: 72829, fallback: true }, function(err, item) {
+ test.error(err);
+ test.ok(item);
+ test.equal(item.id, 72829);
+ test.end();
+ });
+});

0 comments on commit a5b07ec

Please sign in to comment.
Something went wrong with that request. Please try again.