diff options
Diffstat (limited to 'web-ui/test')
-rw-r--r-- | web-ui/test/spec/tags/data/tags.spec.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web-ui/test/spec/tags/data/tags.spec.js b/web-ui/test/spec/tags/data/tags.spec.js index 53978fb8..7c4cd4e0 100644 --- a/web-ui/test/spec/tags/data/tags.spec.js +++ b/web-ui/test/spec/tags/data/tags.spec.js @@ -23,14 +23,13 @@ describeComponent('tags/data/tags', function () { var deferred = $.Deferred(); spyOn($, 'ajax').and.returnValue(deferred); - var me = {}; - var eventSpy = spyOnEvent(me, Pixelated.events.tags.received); + var eventSpy = spyOnEvent(document, Pixelated.events.tags.received); - this.component.trigger(Pixelated.events.tags.want, { caller: me}); + this.component.trigger(Pixelated.events.tags.want); deferred.resolve(['foo', 'bar', 'quux/bar']); - expect(eventSpy).toHaveBeenTriggeredOn(me); + expect(eventSpy).toHaveBeenTriggeredOn(document); }); it('triggers an event containing the returned tags', function() { @@ -38,9 +37,8 @@ describeComponent('tags/data/tags', function () { var deferred = $.Deferred(); spyOn($, 'ajax').and.returnValue(deferred); - var me = {}; - var eventSpy = spyOnEvent(me, Pixelated.events.tags.received); - this.component.trigger(Pixelated.events.tags.want, { caller: me }); + var eventSpy = spyOnEvent(document, Pixelated.events.tags.received); + this.component.trigger(Pixelated.events.tags.want); deferred.resolve(tags); |