Skip to content

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Burgmer committed Feb 17, 2014
1 parent 3b9dfbf commit 79d0d46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/IntegrationSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ describe("Integration test", function () {
width = 204,
height = 100;

var fulfilled = function (value) {
var defer = ayepromise.defer();
defer.resolve(value);
return defer.promise;
};

var loadDocFixture = function (url, callback) {
var request = new window.XMLHttpRequest(),
doc;
Expand Down Expand Up @@ -83,7 +89,7 @@ describe("Integration test", function () {
});

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

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

0 comments on commit 79d0d46

Please sign in to comment.