2017-05-12 06:10:46 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
|
|
|
// Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-06-12 10:55:14 -05:00
|
|
|
define(['sources/check_node_visibility'],
|
|
|
|
function (checkNodeVisibility) {
|
|
|
|
describe('checkNodeVisibility', function () {
|
2017-05-12 06:10:46 -05:00
|
|
|
|
|
|
|
var browser;
|
|
|
|
|
|
|
|
browser = jasmine.createSpyObj('browser', [
|
2017-06-12 10:55:14 -05:00
|
|
|
'node_preference_data', 'get_preference']
|
2017-05-12 06:10:46 -05:00
|
|
|
);
|
|
|
|
|
2017-06-12 10:55:14 -05:00
|
|
|
describe('when node is server collection', function () {
|
|
|
|
it('returns true', function () {
|
2017-05-12 06:10:46 -05:00
|
|
|
expect(checkNodeVisibility(browser, 'coll-server')).toEqual(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2017-06-12 10:55:14 -05:00
|
|
|
describe('when node is server', function () {
|
|
|
|
it('returns true', function () {
|
2017-05-12 06:10:46 -05:00
|
|
|
expect(checkNodeVisibility(browser, 'server')).toEqual(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|