Skip to content

Commit

Permalink
Added test for when optional sheetId paramater passed
Browse files Browse the repository at this point in the history
  • Loading branch information
jlovison committed Jan 8, 2015
1 parent 5c8fc35 commit 2a9ae49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/angular-gcms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 2a9ae49

Please sign in to comment.