From a9c73583ea27309abe75f6e7d6bc40d915f6c65e Mon Sep 17 00:00:00 2001 From: David Cardwell Date: Wed, 4 Mar 2015 19:48:20 -0500 Subject: [PATCH] Add a test for generateNewGlyph in tooltip.js Test to see if generateNewGlyph successfully adds glyph_cells and glyph_color to local storage, and that glyph_cells has 15 items. --- shared/test/tooltip.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shared/test/tooltip.js b/shared/test/tooltip.js index 1de89d7..1572f88 100644 --- a/shared/test/tooltip.js +++ b/shared/test/tooltip.js @@ -18,4 +18,13 @@ describe ("Tooltip Test Suite", function() { expect(true).toBe(true); }); + it("can generate a new glyph", function() { + privlyTooltip.generateNewGlyph(); + var glyphString = ls.getItem("glyph_cells"); + expect(glyphString).toBeDefined(); + expect(ls.getItem("glyph_color")).toBeDefined(); + var glyphArray = glyphString.split(","); + expect(glyphArray.length).toBe(15); + }); + });