Renamed components to lib in the JS project, as Ember has components and they mean something different.

This commit is contained in:
Robin Ward
2013-10-24 12:36:46 -04:00
parent 3909f93a7e
commit 9adcd1579d
41 changed files with 15 additions and 10 deletions

View File

@ -0,0 +1,23 @@
module("Discourse.Onebox", {
setup: function() {
this.anchor = $("<a href='http://bla.com'></a>")[0];
}
});
asyncTestDiscourse("Stops rapid calls with cache true", function() {
this.stub(Discourse, "ajax").returns(Ember.RSVP.resolve());
Discourse.Onebox.load(this.anchor, true);
Discourse.Onebox.load(this.anchor, true);
start();
ok(Discourse.ajax.calledOnce);
});
asyncTestDiscourse("Stops rapid calls with cache true", function() {
this.stub(Discourse, "ajax").returns(Ember.RSVP.resolve());
Discourse.Onebox.load(this.anchor, false);
Discourse.Onebox.load(this.anchor, false);
start();
ok(Discourse.ajax.calledOnce);
});