From 2a3044e0cf0585bf997fa6ea6a74eeab6ceba602 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Tue, 2 Jul 2013 15:20:17 -0400 Subject: [PATCH] Tests: verify invalid string log messages --- test/strings.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/test/strings.js b/test/strings.js index c454e808..1c740a8a 100644 --- a/test/strings.js +++ b/test/strings.js @@ -1,6 +1,12 @@ +/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util, testLog */ + (function() { - module("strings"); + module("strings", { + setup: function () { + testLog.reset(); + } + }); test("getSubString", function() { equal(OpenSeadragon.getString("Errors.Dzi"), @@ -15,10 +21,13 @@ }); test("getInvalidString", function() { - equal(OpenSeadragon.getString("Greeting"), "", - "Handled unset string key"); - equal(OpenSeadragon.getString("Errors"), "", - "Handled requesting parent key"); + equal(OpenSeadragon.getString("Greeting"), "", "Handled unset string key"); + ok(testLog.debug.contains('["Untranslated source string:","Greeting"]'), + 'Invalid string keys are logged'); + + equal(OpenSeadragon.getString("Errors"), "", "Handled requesting parent key"); + ok(testLog.debug.contains('["Untranslated source string:","Errors"]'), + 'Invalid string parent keys are logged'); }); test("setString", function() {