Skip to content

Commit

Permalink
Bug 981328 - [Search] XHR mock is not restored r=rickychien
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon committed Mar 8, 2014
1 parent efde397 commit fdaff52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/search/test/unit/providers/marketplace_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,18 @@ suite('search/providers/marketplace', function() {
};

var requests = [];
var xhr;

setup(function() {
var xhr = sinon.useFakeXMLHttpRequest();
xhr = sinon.useFakeXMLHttpRequest();
requests = [];
xhr.onCreate = function(req) { requests.push(req); };
});

teardown(function() {
xhr.restore();
});

test('renders all results', function() {
subject.search('fake', Search.collect.bind(Search, subject));
var req = requests[0];
Expand Down

0 comments on commit fdaff52

Please sign in to comment.