Skip to content

Commit 79d0d46

Browse files
author
Christoph Burgmer
committed
Fix integration test
1 parent 3b9dfbf commit 79d0d46

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/IntegrationSpec.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ describe("Integration test", function () {
33
width = 204,
44
height = 100;
55

6+
var fulfilled = function (value) {
7+
var defer = ayepromise.defer();
8+
defer.resolve(value);
9+
return defer.promise;
10+
};
11+
612
var loadDocFixture = function (url, callback) {
713
var request = new window.XMLHttpRequest(),
814
doc;
@@ -83,7 +89,7 @@ describe("Integration test", function () {
8389
});
8490

8591
ifNotInPhantomJSAndNotLocalRunnerIt("should take a URL and load non UTF-8 content", function (done) {
86-
var inlineReferencesSpy = spyOn(rasterizeHTMLInline, 'inlineReferences');
92+
var inlineReferencesSpy = spyOn(rasterizeHTMLInline, 'inlineReferences').and.returnValue(fulfilled());
8793

8894
rasterizeHTML.drawURL(rasterizeHTMLTestHelper.fixturesPath + "nonUTF8Encoding.html").then(function () {
8995
expect(inlineReferencesSpy).toHaveBeenCalled();

0 commit comments

Comments
 (0)