Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created May 26, 2010 17:56
Show Gist options
  • Save mrkurt/414814 to your computer and use it in GitHub Desktop.
Save mrkurt/414814 to your computer and use it in GitHub Desktop.
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