pgadmin4/web/regression/javascript/check_node_visibility_spec.js

33 lines
972 B
JavaScript
Raw Normal View History

//////////////////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
2023-01-02 00:23:55 -06:00
// Copyright (C) 2013 - 2023, 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 () {
2022-09-08 07:38:58 -05:00
let browser;
browser = jasmine.createSpyObj('browser', [
'node_preference_data', 'get_preference']
);
describe('when node is server collection', function () {
it('returns true', function () {
expect(checkNodeVisibility(browser, 'coll-server')).toEqual(true);
});
});
describe('when node is server', function () {
it('returns true', function () {
expect(checkNodeVisibility(browser, 'server')).toEqual(true);
});
});
});
});