describe("folderManager", function() {
    var scope,
        response_data,
        $httpBackend;
    beforeEach(angular.mock.module("feedhoos"));
    beforeEach(angular.mock.inject(function($rootScope, _$httpBackend_) {
        scope = $rootScope.$new();
        $httpBackend = _$httpBackend_;
        $httpBackend.expect("GET", "/folder/list/")
            .respond('[{"rating": 1, "type": "folder", "id": 1, "title": "title1"}, {"rating": 5, "type": "folder", "id": 2, "title": "title2"}, {"rating": 0, "type": "folder", "id": 3, "title": "title3"}]');
        response_data = [
            {"rating": 1, "type": "folder", "id": 1, "title": "title1"},
            {"rating": 5, "type": "folder", "id": 2, "title": "title2"},
            {"rating": 0, "type": "folder", "id": 3, "title": "title3"}
        ];
    }));

    it('should set', inject(function(folderManager) {
        folderManager.set(scope, function() {});
        $httpBackend.flush();
        expect(folderManager.data).toEqual(response_data);
    }));

    it('should defalt title is ---', inject(function(folderManager) {
        folderManager.set(scope, function() {});
        $httpBackend.flush();
        expect(folderManager.get_title(0)).toEqual('---');
    }));

    it('should title', inject(function(folderManager) {
        folderManager.set(scope, function() {});
        $httpBackend.flush();
        expect(folderManager.get_title(2)).toEqual('title2');
    }));
});

@@ -70,16 +70,35 @@
 e_data,%0A
+        defalt_id,%0A
         
@@ -265,24 +265,47 @@
 ope.$new();%0A
+        defalt_id = 0;%0A
         $htt
@@ -1482,13 +1482,930 @@
     %7D));
+%0A%0A    it('should get_title_by_feed_id', inject(function(folderManager, bookmarkManager) %7B%0A        $httpBackend.expect(%22GET%22, %22/bookmark/list/%22)%0A            .respond('%7B' +%0A                '%220%22: %7B%22rating%22: 6, %22folder_id%22: 0%7D,' +%0A                '%221%22: %7B%22rating%22: 3, %22folder_id%22: 1%7D,' +%0A                '%222%22: %7B%22rating%22: 0, %22folder_id%22: 0%7D,' +%0A                '%223%22: %7B%22rating%22: 0, %22folder_id%22: 2%7D,' +%0A                '%224%22: %7B%22rating%22: 3, %22folder_id%22: 0%7D,' +%0A                '%225%22: %7B%22rating%22: 0, %22folder_id%22: 0%7D,' +%0A                '%226%22: %7B%22rating%22: 5, %22folder_id%22: 0%7D,' +%0A                '%227%22: %7B%22rating%22: 1, %22folder_id%22: 2%7D' +%0A            '%7D');%0A        folderManager.set(scope, function() %7B%7D);%0A        bookmarkManager.set(scope, function() %7B%7D);%0A        $httpBackend.flush();%0A        expect(folderManager.get_title_by_feed_id(2)).toEqual('---');%0A        expect(folderManager.get_title_by_feed_id(1)).toEqual('title1');%0A    %7D));
 %0A%7D);%0A

add test for folderManager::get_title_by_feed_id()