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