Commit | Line | Data |
f064a2ab |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | |
8 | use DBICTest; |
9 | |
10 | my $ar = DBICTest->init_schema->resultset("Artist")->find(1); |
11 | |
12 | ok (! $ar->can("not_yet_there_column"), "No accessor for nonexitentcolumn" ); |
13 | |
14 | $ar->add_column("not_yet_there_column"); |
15 | ok ($ar->has_column("not_yet_there_column"), "Metadata correct after nonexitentcolumn addition" ); |
16 | ok ($ar->can("not_yet_there_column"), "Accessor generated for nonexitentcolumn" ); |
17 | |
18 | $ar->not_yet_there_column('I EXIST \o/'); |
19 | |
20 | is { $ar->get_columns }->{not_yet_there_column}, 'I EXIST \o/', "Metadata propagates to mutli-column methods"; |
21 | |
22 | done_testing; |