mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Disable function statistics on Greenplum. Fixes #3176
This commit is contained in:
committed by
Dave Page
parent
06ff05762e
commit
d1ab47c10c
36
web/regression/javascript/misc/statistics/statistics_spec.js
Normal file
36
web/regression/javascript/misc/statistics/statistics_spec.js
Normal file
@@ -0,0 +1,36 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
import {nodeHasStatistics} from "../../../../pgadmin/static/js/misc/statistics/statistics";
|
||||
|
||||
describe('#nodeHasStatistics', () => {
|
||||
describe('when node hasStatistics is not a function', () => {
|
||||
it('return the value of hasStatistics', () => {
|
||||
const node = {
|
||||
hasStatistics: true,
|
||||
};
|
||||
expect(nodeHasStatistics(node, {})).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when node hasStatistics is a function', () => {
|
||||
describe('when the function returns true', () => {
|
||||
it('returns true', () => {
|
||||
const node = {
|
||||
hasStatistics: () => true,
|
||||
getTreeNodeHierarchy: jasmine.createSpy(),
|
||||
};
|
||||
const item = {};
|
||||
|
||||
expect(nodeHasStatistics(node, item)).toBe(true);
|
||||
expect(node.getTreeNodeHierarchy).toHaveBeenCalledWith(item);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user