Remove redundant skip checks in CDBICompat tests
[dbsrgits/DBIx-Class.git] / t / cdbi / construct.t
1 use strict;
2 use warnings;
3 use Test::More;
4
5 use lib 't/cdbi/testlib';
6 use Film;
7
8 {
9     Film->insert({
10         Title     => "Breaking the Waves",
11         Director  => 'Lars von Trier',
12         Rating    => 'R'
13     });
14
15     my $film = Film->construct({
16         Title     => "Breaking the Waves",
17         Director  => 'Lars von Trier',
18     });
19
20     isa_ok $film, "Film";
21     is $film->title,    "Breaking the Waves";
22     is $film->director, "Lars von Trier";
23     is $film->rating,   "R",
24         "constructed objects can get missing data from the db";
25 }
26
27 {
28     package Foo;
29     use base qw(Film);
30     Foo->columns( TEMP => qw(temp_thing) );
31     my $film = Foo->construct({
32         temp_thing  => 23
33     });
34
35     ::is $film->temp_thing, 23, "construct sets temp columns";
36 }
37
38 done_testing;