Sha256: 3f477303868ed434d145d10d5d739020d672ac2b26c666b721341c578ab3cedc

Contents?: true

Size: 1.74 KB

Versions: 16

Compression:

Stored size: 1.74 KB

Contents

BEGIN;

  SELECT PLAN(14);

  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', 'test2', 'body', 'test body')$$, '__u_file');

  SELECT lives_ok($$INSERT INTO dummy_landable.themes (file, name, body, description, editable) VALUES ('filename2', 'test3', 'body', 'test body', true)$$);
  SELECT throws_matching($$INSERT INTO dummy_landable.themes (file, name, body, description) VALUES ('FILENAME3', 'test3', 'body', 'test body')$$, '__u_name');

  SELECT * FROM finish();

ROLLBACK;

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.14.0 db/test/landable.themes.sql
landable-1.13.2 db/test/landable.themes.sql
landable-1.13.1 db/test/landable.themes.sql
landable-1.12.3 db/test/landable.themes.sql
landable-1.12.2 db/test/landable.themes.sql
landable-1.12.1 db/test/landable.themes.sql
landable-1.11.1 db/test/landable.themes.sql
landable-1.11.0 db/test/landable.themes.sql
landable-1.10.0.rc2 db/test/landable.themes.sql
landable-1.10.0.rc1 db/test/landable.themes.sql
landable-1.9.2 db/test/landable.themes.sql
landable-1.9.1 db/test/landable.themes.sql
landable-1.9.0 db/test/landable.themes.sql
landable-1.9.0.rc2 db/test/landable.themes.sql
landable-1.9.0.rc1 db/test/landable.themes.sql
landable-1.8.0 db/test/landable.themes.sql