summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/mysql-text-default.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/mysql-text-default.t b/t/mysql-text-default.t
new file mode 100644
index 0000000..21d446a
--- /dev/null
+++ b/t/mysql-text-default.t
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use Test::More tests => 2;
+
+use_ok 'DBIx::DBSchema::Column';
+
+my $col = DBIx::DBSchema::Column->new({
+ name => 'bar',
+ type => 'text',
+ default => "'bat'"
+});
+
+my $sql = $col->line("DBI:mysql:test");
+diag "Generated: $sql";
+unlike $sql, qr/default/i, "column bar doesn't have a default";
+