From: Ken Youens-Clark Date: Fri, 6 Jun 2003 00:13:16 +0000 (+0000) Subject: Added tests for $field->extra. X-Git-Tag: v0.02~88 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adfdb552e3d52ddb61880d8d76cfcfc3a63ae331;p=dbsrgits%2FSQL-Translator.git Added tests for $field->extra. --- diff --git a/t/13schema.t b/t/13schema.t index 7b596d7..3e978e1 100644 --- a/t/13schema.t +++ b/t/13schema.t @@ -4,7 +4,7 @@ $| = 1; use strict; -use Test::More 'no_plan'; # plans => 1; +use Test::More tests => 150; use SQL::Translator::Schema::Constants; require_ok( 'SQL::Translator::Schema' ); @@ -119,6 +119,12 @@ require_ok( 'SQL::Translator::Schema' ); is( $f1->size('30'), '30', 'Field size is "30"' ); is( $f1->is_primary_key(0), '0', 'Field is_primary_key is negative' ); + $f1->extra( foo => 'bar' ); + $f1->extra( { baz => 'quux' } ); + my %extra = $f1->extra; + is( $extra{'foo'}, 'bar', 'Field extra "foo" is "bar"' ); + is( $extra{'baz'}, 'quux', 'Field extra "baz" is "quux"' ); + # # New field with args #