Skip to content

Commit

Permalink
Adding a test for loading
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jul 15, 2016
1 parent 55719c3 commit e9b503d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/haro_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ exports["create (batch)"] = {
test: function (test) {
var self = this;

test.expect(11);
test.expect(14);
test.equal(this.store.total, 0, "Should be '0'");
test.equal(this.store.data.size, 0, "Should be '0'");
test.equal(this.store.loading, false, "Should be 'false'");
this.store.batch(data, "set").then(function () {
test.equal(self.store.loading, false, "Should be 'false'");
test.equal(self.store.total, 6, "Should be '6'");
test.equal(self.store.data.size, 6, "Should be '6'");
test.equal(self.store.registry.length, 6, "Should be '6'");
Expand All @@ -101,6 +103,7 @@ exports["create (batch)"] = {
}, function () {
test.done();
});
test.equal(this.store.loading, true, "Should be 'true'");
}
};

Expand Down

0 comments on commit e9b503d

Please sign in to comment.