From 2a9ae4913fa4b63c375512a0eb140bd87a0b37c1 Mon Sep 17 00:00:00 2001 From: Josh Lovison Date: Thu, 8 Jan 2015 01:38:44 -0500 Subject: [PATCH] Added test for when optional sheetId paramater passed --- test/unit/angular-gcms.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/angular-gcms.js b/test/unit/angular-gcms.js index 672a9fa..c1069c3 100644 --- a/test/unit/angular-gcms.js +++ b/test/unit/angular-gcms.js @@ -39,6 +39,14 @@ describe('angular-gcms', function () { GcmsService.get(testKey); httpBackend.flush(); }); + + it('should fetch from the server based on a key and sheetId', function () { + var testSheetId = "ab1"; + var sheetUrl = 'https://spreadsheets.google.com/feeds/cells/' + testKey + '/' + testSheetId + '/public/values?alt=json'; + httpBackend.expectGET(sheetUrl).respond(404); + GcmsService.get(testKey, ['column1', 'column2'], testSheetId); + httpBackend.flush(); + }); it('should parse and return data when fetched', function () { var resultData = {