From: Mark Addison Date: Mon, 29 Mar 2004 10:10:50 +0000 (+0000) Subject: Changed the 'id' field to 'age' on the first test constraint, so that one of its X-Git-Tag: v0.06~116 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=481b05ffd183c8b814db01c50db1fc69630f444a;p=dbsrgits%2FSQL-Translator.git Changed the 'id' field to 'age' on the first test constraint, so that one of its fields is a real field of its table! --- diff --git a/t/13schema.t b/t/13schema.t index bbb002e..073ff8d 100644 --- a/t/13schema.t +++ b/t/13schema.t @@ -233,26 +233,26 @@ require_ok( 'SQL::Translator::Schema' ); isa_ok( $constraint1, 'SQL::Translator::Schema::Constraint', 'Constraint' ); is( $constraint1->name, 'foo', 'Constraint name is "foo"' ); - $fields = join(',', $constraint1->fields('id') ); - is( $fields, 'id', 'Constraint field = "id"' ); + $fields = join(',', $constraint1->fields('age') ); + is( $fields, 'age', 'Constraint field = "age"' ); - $fields = join(',', $constraint1->fields('id,id') ); - is( $fields, 'id', 'Constraint field = "id"' ); + $fields = join(',', $constraint1->fields('age,age') ); + is( $fields, 'age', 'Constraint field = "age"' ); - $fields = join(',', $constraint1->fields('id', 'name') ); - is( $fields, 'id,name', 'Constraint field = "id,name"' ); + $fields = join(',', $constraint1->fields('age', 'name') ); + is( $fields, 'age,name', 'Constraint field = "age,name"' ); - $fields = join(',', $constraint1->fields( 'id,name,id' ) ); - is( $fields, 'id,name', 'Constraint field = "id,name"' ); + $fields = join(',', $constraint1->fields( 'age,name,age' ) ); + is( $fields, 'age,name', 'Constraint field = "age,name"' ); - $fields = join(',', $constraint1->fields( 'id, name' ) ); - is( $fields, 'id,name', 'Constraint field = "id,name"' ); + $fields = join(',', $constraint1->fields( 'age, name' ) ); + is( $fields, 'age,name', 'Constraint field = "age,name"' ); - $fields = join(',', $constraint1->fields( [ 'id', 'name' ] ) ); - is( $fields, 'id,name', 'Constraint field = "id,name"' ); + $fields = join(',', $constraint1->fields( [ 'age', 'name' ] ) ); + is( $fields, 'age,name', 'Constraint field = "age,name"' ); - $fields = join(',', $constraint1->fields( qw[ id name ] ) ); - is( $fields, 'id,name', 'Constraint field = "id,name"' ); + $fields = join(',', $constraint1->fields( qw[ age name ] ) ); + is( $fields, 'age,name', 'Constraint field = "age,name"' ); is( $constraint1->match_type, '', 'Constraint match type is empty' ); is( $constraint1->match_type('foo'), undef,