diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 20:26:04 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-11 20:26:04 +0200 |
commit | f3091d84e14537a42334e66ea6588cf2b83f9ab6 (patch) | |
tree | 943151aa564177e956d5dc1b2fff12845e48c4c0 /js/tests/unit/service/FolderResourceSpec.js | |
parent | f50dba835fa58f9ba979a9038ffd185ab8fe3b96 (diff) |
various work on creating feeds, folders and showing folders
Diffstat (limited to 'js/tests/unit/service/FolderResourceSpec.js')
-rw-r--r-- | js/tests/unit/service/FolderResourceSpec.js | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/js/tests/unit/service/FolderResourceSpec.js b/js/tests/unit/service/FolderResourceSpec.js index 01858bbc6..2a9108282 100644 --- a/js/tests/unit/service/FolderResourceSpec.js +++ b/js/tests/unit/service/FolderResourceSpec.js @@ -58,20 +58,6 @@ describe('FolderResource', function () { })); - it ('should not rename a folder if it exists', inject(function ( - FolderResource) { - http.expectPOST('base/folders/1/rename', { - folderName: 'SYE' - }).respond(200, {}); - - FolderResource.rename('ye', 'sye'); - - http.flush(); - - expect(FolderResource.get('ye').id).toBe(1); - })); - - it ('should open a folder', inject(function (FolderResource) { http.expectPOST('base/folders/3/open', { folderId: 3, @@ -99,17 +85,16 @@ describe('FolderResource', function () { })); - it ('should not create a folder if it exists', inject(function ( - FolderResource) { + it ('should set a folder error message', inject(function (FolderResource) { http.expectPOST('base/folders', { - folderName: 'SYE' - }).respond(200, {}); + folderName: 'HEY' + }).respond(400, {message: 'carramba'}); - FolderResource.create('SYE'); + FolderResource.create('hey'); http.flush(); - expect(FolderResource.size()).toBe(3); + expect(FolderResource.get('HEY').error).toBe('carramba'); })); |