diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-18 17:08:04 -0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-18 17:08:04 -0200 |
commit | 57b349132ad1f9a07b54fb2ccfbc8ef9f7437e68 (patch) | |
tree | 4999ccc0c258c2d1e1de8b3894394dd0dbc3649f /web-ui | |
parent | 6ef38d4dfe81dcdeda6dd3287587b80ad58e4c6c (diff) |
Stubbing getJSON in some js specs so /keys?search= doesnt get called
Diffstat (limited to 'web-ui')
4 files changed, 7 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/draft_box.spec.js b/web-ui/test/spec/mail_view/ui/draft_box.spec.js index fb21b97c..0113ca01 100644 --- a/web-ui/test/spec/mail_view/ui/draft_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/draft_box.spec.js @@ -8,6 +8,7 @@ describeComponent('mail_view/ui/draft_box', function () { beforeEach(function () { Pixelated.mockBloodhound(); mail = Pixelated.testData().parsedMail.simpleTextPlain; + spyOn($, 'getJSON').and.returnValue($.Deferred()); }); describe('when initializing', function () { diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients.spec.js index 6aa4589a..7dd9000f 100644 --- a/web-ui/test/spec/mail_view/ui/recipients/recipients.spec.js +++ b/web-ui/test/spec/mail_view/ui/recipients/recipients.spec.js @@ -4,6 +4,10 @@ describeComponent('mail_view/ui/recipients/recipients',function () { 'use strict'; var recipientsUpdatedEvent; + beforeEach(function () { + spyOn($, 'getJSON').and.returnValue($.Deferred()); + }); + describe('initialization', function() { it('adds recipients', function() { this.setupComponent({name: 'to', addresses: ['foobar@gmail.com'] }); diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js index 6297a5aa..70ae9301 100644 --- a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js +++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js @@ -3,6 +3,7 @@ describeComponent('mail_view/ui/recipients/recipients_input',function () { beforeEach(function () { this.setupComponent({name: 'to'}); + spyOn($, 'getJSON').and.returnValue($.Deferred()); }); describe('keys that finish address input', function () { diff --git a/web-ui/test/spec/mail_view/ui/reply_box.spec.js b/web-ui/test/spec/mail_view/ui/reply_box.spec.js index 8adefcd0..9542f37a 100644 --- a/web-ui/test/spec/mail_view/ui/reply_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/reply_box.spec.js @@ -8,6 +8,7 @@ describeComponent('mail_view/ui/reply_box', function () { }; this.setupComponent(attrs); i18n = require('views/i18n'); + spyOn($, 'getJSON').and.returnValue($.Deferred()); }); describe('reply compose box', function() { |