fixes https://rt.cpan.org/Ticket/Display.html?id=93432
[dbsrgits/DBIx-Class-InflateColumn-Object-Enum.git] / t / lib / TestDB / WithBadDefaultValue.pm
diff --git a/t/lib/TestDB/WithBadDefaultValue.pm b/t/lib/TestDB/WithBadDefaultValue.pm
new file mode 100644 (file)
index 0000000..473931d
--- /dev/null
@@ -0,0 +1,33 @@
+package TestDB::WithBadDefaultValue;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/
+    InflateColumn::Object::Enum
+    PK::Auto
+    Core
+/);
+__PACKAGE__->table('withbaddefaultvalue');
+__PACKAGE__->add_columns(
+    id => {
+        data_type => 'number',
+        is_auto_increment => 1,
+        is_nullable => 0
+    },
+    enum => {
+        data_type => 'varchar',
+        is_enum => 1,
+        is_nullable => 0,
+               default_value => 'badvalue',
+        extra => {
+            list => [qw/red green blue/]
+        },
+    }
+);
+__PACKAGE__->set_primary_key('id');
+
+1;
+