{"size": 1448, "ext": "js", "max_stars_repo_path": "modules/tests/spec/listAsset_spec.js", "max_stars_repo_name": "rmsamitha/TestingPCRepo", "max_stars_repo_stars_event_min_datetime": "2015-11-08T22:55:19.000Z", "max_stars_repo_stars_event_max_datetime": "2016-08-02T08:28:42.000Z", "max_issues_repo_path": "modules/tests/spec/listAsset_spec.js", "max_issues_repo_name": "wso2-attic/product-pc", "max_issues_repo_issues_event_min_datetime": "2015-06-14T05:18:25.000Z", "max_issues_repo_issues_event_max_datetime": "2016-08-07T08:58:20.000Z", "max_forks_repo_path": "modules/tests/spec/listAsset_spec.js", "max_forks_repo_name": "wso2-attic/product-pc", "max_forks_repo_forks_event_min_datetime": "2015-04-22T06:09:33.000Z", "max_forks_repo_forks_event_max_datetime": "2016-08-18T06:19:01.000Z"}
{"max_stars_count": 4, "max_issues_count": 9, "max_forks_count": 24, "avg_line_length": 38.1052631579, "max_line_length": 84, "alphanum_fraction": 0.6222375691}
/*
 * Copyright (c) 2015, WSO2 Inc. (http://wso2.com) All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
describe('list chevron diagram items - publisher', function() {
    it('Confirm ajax call success of retrieving requested digram name', function() {
        var element = "diagram 1";
        spyOn($, "ajax").and.callFake(function(options) {
            options.success();
        });
        var callback = jasmine.createSpy();
        getRelatedChevronDiagram(callback, element);
        expect(callback).toHaveBeenCalled();
    });
    it('Get diagram name on link click', function() {
        var link = $('<a/>', {
            text: 'diagram1',
            click: function() {
                var link1 = $(this);
                var linkName = link1.text();
                return linkName;
            }
        });
        var linkText = link.click();
        expect(linkText.length).toEqual(1);
    });
});