mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix creation of tables and columns in GPDB. Fixes #3099
This commit is contained in:
committed by
Dave Page
parent
1a958a3951
commit
15862e903a
@@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import {show_advanced_tab} from '../../../../../../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/show_advanced_tab';
|
||||
|
||||
describe('#show_advanced_tab', () => {
|
||||
let tableModel;
|
||||
|
||||
describe('when node information is not available', () => {
|
||||
it('should return true', () => {
|
||||
tableModel = {};
|
||||
|
||||
expect(show_advanced_tab(tableModel)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when node information is available', () => {
|
||||
describe('when server is not defined', () => {
|
||||
it('should return true', () => {
|
||||
tableModel = {
|
||||
node_info: {},
|
||||
};
|
||||
|
||||
expect(show_advanced_tab(tableModel)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when server is defined', () => {
|
||||
describe('when server is green plum', () => {
|
||||
it('should return false', () => {
|
||||
tableModel = {
|
||||
node_info: {
|
||||
server: {
|
||||
server_type: 'gpdb',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
expect(show_advanced_tab(tableModel)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when server is Postgres', () => {
|
||||
it('should return true', () => {
|
||||
tableModel = {
|
||||
node_info: {
|
||||
server: {
|
||||
server_type: 'postgres',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
expect(show_advanced_tab(tableModel)).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user