X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2Fcopy.t;fp=t%2Fcdbi-t%2Fcopy.t;h=0000000000000000000000000000000000000000;hb=50891152d0b24649bfd67bdba97feec86b11c064;hp=cdcae15c4ec3be272859c2087f3e164ed32735e4;hpb=23209c4474d71e419b3fcf9699ae05565c2997f5;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/copy.t b/t/cdbi-t/copy.t deleted file mode 100644 index cdcae15..0000000 --- a/t/cdbi-t/copy.t +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use Test::More; - -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@") - : (tests=> 4); -} - -INIT { - use lib 't/testlib'; -} - -{ - package # hide from PAUSE - MyFilm; - - use base 'DBIx::Class::Test::SQLite'; - use strict; - - __PACKAGE__->set_table('Movies'); - __PACKAGE__->columns(All => qw(id title)); - - sub create_sql { - return qq{ - id INTEGER PRIMARY KEY AUTOINCREMENT, - title VARCHAR(255) - } - } -} - -my $film = MyFilm->create({ title => "For Your Eyes Only" }); -ok $film->id; - -my $new_film = $film->copy; -ok $new_film->id; -isnt $new_film->id, $film->id, "copy() gets new primary key"; - -$new_film = $film->copy(42); -is $new_film->id, 42, "copy() with new id"; -