From 495bc391e140cc2bb462c81fa90410a0fe8f6a4c Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Mon, 20 Oct 2014 12:17:18 +0200 Subject: massive update of bower and npm libs - includes flight, jasmine and a bunch of stuff. If things get weird when developing, remove you bower_components and your node_modules and install it again --- web-ui/test/spec/tags/data/tags.spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web-ui/test/spec/tags/data/tags.spec.js') diff --git a/web-ui/test/spec/tags/data/tags.spec.js b/web-ui/test/spec/tags/data/tags.spec.js index 41821366..e42a7752 100644 --- a/web-ui/test/spec/tags/data/tags.spec.js +++ b/web-ui/test/spec/tags/data/tags.spec.js @@ -4,20 +4,20 @@ describeComponent('tags/data/tags', function () { 'use strict'; beforeEach(function () { - setupComponent(); + this.setupComponent(); }); it('asks the server for tags when receiving the tags:want event', function() { - spyOn($, 'ajax').andReturn({done: function() {}}); + spyOn($, 'ajax').and.returnValue({done: function() {}}); this.component.trigger(Pixelated.events.tags.want); - expect($.ajax.mostRecentCall.args[0]).toEqual('/tags'); + expect($.ajax.calls.mostRecent().args[0]).toEqual('/tags'); }); it('triggers an event on the initial sender after receiving tags', function() { var f; - spyOn($, 'ajax').andReturn({done: function(d) { f = d; }}); + spyOn($, 'ajax').and.returnValue({done: function(d) { f = d; }}); var me = {}; var eventSpy = spyOnEvent(me, Pixelated.events.tags.received); @@ -29,13 +29,13 @@ describeComponent('tags/data/tags', function () { it('triggers an event containing the returned tags', function() { var f; - spyOn($, 'ajax').andReturn({done: function(d) { f = d; }}); + spyOn($, 'ajax').and.returnValue({done: function(d) { f = d; }}); var me = {}; var eventSpy = spyOnEvent(me, Pixelated.events.tags.received); this.component.trigger(Pixelated.events.tags.want, { caller: me }); var tags = ['foo', 'bar', 'quux/bar']; f(tags); tags.push(this.component.all); - expect(eventSpy.mostRecentCall.data).toEqual({tags: tags}); + expect(eventSpy.mostRecentCall.data).toEqual(jasmine.objectContaining({tags: tags})); }); }); -- cgit v1.2.3