Promote resolve_relationship_condition to a 1st-class API method
[dbsrgits/DBIx-Class.git] / xt / extra / diagnostics / incomplete_reregister.t
CommitLineData
d56e05c7 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3# things will die if this is set
4BEGIN { $ENV{DBIC_ASSERT_NO_ERRONEOUS_METAINSTANCE_USE} = 0 }
5
6use strict;
7use warnings;
8
9use Test::More;
10use Test::Warn;
11
12use DBICTest;
13
14my $s = DBICTest->init_schema( no_deploy => 1 );
15
16
17warnings_exist {
18 DBICTest::Schema::Artist->add_column("somethingnew");
19 $s->unregister_source("Artist");
20 $s->register_class( Artist => "DBICTest::Schema::Artist" );
21}
22 qr/The ResultSource instance you just registered on .+ \Qas 'Artist' seems to have no relation to DBICTest::Schema->source('Artist') which in turn is marked stale/,
23 'Expected warning on incomplete re-register of schema-class-level source'
24;
25
26done_testing;