summaryrefslogtreecommitdiffstats
path: root/js/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 03:14:04 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 03:14:04 +0200
commit2c161c47ece07732b0cd1a5a0ea9e8f25bf44441 (patch)
tree6df548dd4ccc1dfee9b32a74cb3376fe8926900b /js/tests
parent761412ebaaf0930499ca26e7acdd0965be5a50ae (diff)
add feed without folder
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/controller/NavigationControllerSpec.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js
index 87b45e94c..cfa2a8557 100644
--- a/js/tests/unit/controller/NavigationControllerSpec.js
+++ b/js/tests/unit/controller/NavigationControllerSpec.js
@@ -305,11 +305,11 @@ describe('NavigationController', function () {
function (url, folderId) {
return {
then: function (callback) {
- callback({
+ callback({feeds: [{
id: 3,
url: url,
folderId: folderId
- });
+ }]});
}
};
})
@@ -339,11 +339,11 @@ describe('NavigationController', function () {
expect(ctrl.newFolder).toBe(false);
expect(FeedResource.create).toHaveBeenCalledWith('test', 3,
undefined);
- expect(Publisher.publishAll).toHaveBeenCalledWith({
+ expect(Publisher.publishAll).toHaveBeenCalledWith({feeds: [{
+ id: 3,
url: 'test',
- folderId: 3,
- id: 3
- });
+ folderId: 3
+ }]});
expect(feed.url).toBe('');
expect(location.path).toHaveBeenCalledWith('/items/feeds/3');
}));
@@ -356,10 +356,11 @@ describe('NavigationController', function () {
function (url, folderId) {
return {
then: function (callback) {
- callback({
+ callback({feeds: [{
+ id: 2,
url: url,
folderId: folderId
- });
+ }]});
}
};
})
@@ -399,10 +400,11 @@ describe('NavigationController', function () {
expect(FeedResource.create).toHaveBeenCalledWith('test', 'john',
undefined);
expect(FolderResource.create).toHaveBeenCalledWith('john');
- expect(Publisher.publishAll).toHaveBeenCalledWith({
+ expect(Publisher.publishAll).toHaveBeenCalledWith({feeds:[{
+ id: 2,
url: 'test',
folderId: 'john'
- });
+ }]});
expect(Publisher.publishAll).toHaveBeenCalledWith({
name: 'john'
});