mirror of
https://github.com/discourse/discourse.git
synced 2025-06-19 15:15:18 +08:00
Renamed components
to lib
in the JS project, as Ember has components and they mean something different.
This commit is contained in:
23
test/javascripts/lib/onebox_test.js
Normal file
23
test/javascripts/lib/onebox_test.js
Normal 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);
|
||||
});
|
Reference in New Issue
Block a user