BEGIN;
    -- Load the TAP functions.
    CREATE EXTENSION pgtap;

    -- Plan the tests.

    SELECT plan(4);

    -- Add data

    \i sql/modules/test/Base.sql

    -- Validate required tables

--    SELECT has_table('business');

    -- Validate required functions

    SELECT has_function('template__get',ARRAY['text','character varying','text']);
    SELECT has_function('template__get_by_id',ARRAY['integer']);
    SELECT has_function('template__list',ARRAY['character varying']);
    SELECT has_function('template__save',ARRAY['text','character varying','text','text']);

    -- Run tests

--    PREPARE test AS select ...;
--    SELECT results_eq('test',result,'Description');
--    DEALLOCATE test;

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

ROLLBACK;
