Created
May 26, 2010 17:56
-
-
Save mrkurt/414814 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ars = new Ars("/", "1272473031.21335", "beer"); | |
asyncTest("a consumer boots", function() { | |
expect(1); | |
ars.boot(function(){ | |
ok(ars.sections instanceof Object, "sections populated"); | |
start(); | |
}); | |
}); | |
asyncTest("a user requests a list of entries", function() { | |
expect(1); | |
ars.list_entries(function(entries) { | |
ok(entries instanceof Array, "entries retrieved"); | |
start(); | |
}); | |
}); | |
asyncTest("a user wants full entries", function() { | |
ars.list_entries(function(e1) { | |
expect(e1.length); | |
ars.ensure_full_entries(e1, function(){ | |
for(var e in e1){ | |
ok(e1[e].fully_loaded, "entry " + e1[e].endpoint + "is fully loaded"); | |
} | |
console.debug(e1); | |
start(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment