Sha256: f945f3725a85ca36164e1d424bfc56b99e5a71dc38be61a52a76f140ace216ec

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

BEGIN;

  SELECT PLAN(12);

  SELECT col_is_pk('dummy_landable', 'themes', 'theme_id', 'Theme_id is PK');

  SELECT col_not_null('dummy_landable', 'themes', 'name', 'Name is not null');
  SELECT col_not_null('dummy_landable', 'themes', 'body', 'body is not null');
  SELECT col_not_null('dummy_landable', 'themes', 'description', 'Description is not null');
  SELECT col_not_null('dummy_landable', 'themes', 'editable', 'Editable is not null');

  SELECT col_has_default('dummy_landable', 'themes', 'editable', $$Editable has default.$$);

  --Verify unique index on theme name
  SELECT lives_ok($$INSERT INTO dummy_landable.themes (name, body, description, editable) VALUES ('test', 'body', 'test body', true)$$);
  SELECT throws_matching($$INSERT INTO dummy_landable.themes (name, body, description) VALUES ('test', 'body', 'test body')$$, 'name');
  SELECT throws_matching($$INSERT INTO dummy_landable.themes (name, body, description) VALUES ('TEST', 'body', 'test body')$$, 'name');

  SELECT index_is_unique('dummy_landable', 'themes', 'dummy_landable_themes__u_file', $$Unique index on file column.$$);
  SELECT lives_ok($$INSERT INTO dummy_landable.themes (file, name, body, description, editable) VALUES ('filename', 'test1', 'body', 'test body', true)$$);
  SELECT throws_matching($$INSERT INTO dummy_landable.themes (file, name, body, description) VALUES ('FILENAME', 'test1', 'body', 'test body')$$, '__u_file');

  SELECT * FROM finish();

ROLLBACK;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.7.1.rc1 db/test/landable.themes.sql
landable-1.7.0 db/test/landable.themes.sql