Merge 'cdbicompat_integration' into 'trunk'
[dbsrgits/DBIx-Class.git] / t / cdbi-t / hasa_without_loading.t
CommitLineData
e60dc79f 1#!/usr/bin/perl -w
2
3use strict;
4use Test::More;
5
6BEGIN {
7 eval "use DBIx::Class::CDBICompat;";
8 plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required')
9 : (tests=> 3);
10}
11
12package Foo;
13
14use base qw(Class::DBI);
15
16eval {
17 Foo->table("foo");
18 Foo->columns(Essential => qw(foo bar));
19 Foo->has_a( bar => "This::Does::Not::Exist::Yet" );
20};
21::is $@, '';
22::is(Foo->table, "foo");
23::is_deeply [sort map lc, Foo->columns], [sort map lc, qw(foo bar)];