BEGIN;
    -- Load the TAP functions.
    CREATE EXTENSION pgtap;
    SET client_min_messages TO warning;

    -- Plan the tests.

    SELECT plan(3);

    -- Add data

    \i xt/data/42-pg/Base.sql

    -- Validate required tables

    SELECT has_table('business');

    -- Validate required functions

    SELECT has_function('business_type__list','{}'::text[]);

    -- Run tests

    INSERT INTO business (description) values ('testing');

    PREPARE test AS SELECT count(*) > 0 from business_type__list()
                    WHERE description = 'testing';
    SELECT results_eq('test',ARRAY[true],'Business Class Inserted');
    DEALLOCATE test;

    -- Finish the tests and clean up.
    SELECT * FROM finish();

ROLLBACK;
