From 7131c7a7da3acd025db5fc41a1c06723423848bf Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Tue, 2 Jul 2013 15:12:31 -0400 Subject: [PATCH] Tests: check for AJAX error log message --- test/basic.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/basic.js b/test/basic.js index add579cb..61f36673 100644 --- a/test/basic.js +++ b/test/basic.js @@ -1,4 +1,4 @@ -/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util */ +/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util, testLog */ (function() { var viewer; @@ -7,6 +7,8 @@ setup: function () { var example = $('
').appendTo("#qunit-fixture"); + testLog.reset(); + viewer = OpenSeadragon({ id: 'example', prefixUrl: '/build/openseadragon/images/', @@ -54,6 +56,9 @@ equal($(".openseadragon-message").length, 1, "Open failures should display a message"); + ok(testLog.log.contains('["AJAX request returned %s: %s",404,"/test/data/not-a-real-file"]'), + "AJAX failures should be logged to the console"); + start(); });