Fix incorrect whitespace test outside of checkouts
[dbsrgits/DBIx-Class.git] / t / relationship / doesnt_exist.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
e60dc79f 3use strict;
5e8cb53c 4use warnings;
e60dc79f 5
6use Test::More;
c0329273 7
e60dc79f 8use DBICTest;
9
10my $schema = DBICTest->init_schema();
11
12plan tests => 3;
13
14my $bookmark = $schema->resultset("Bookmark")->find(1);
15my $link = $bookmark->link;
16my $link_id = $link->id;
17ok $link->id;
18
19$link->delete;
450e6dbf 20is $schema->resultset("Link")->search({id => $link_id})->count, 0,
e60dc79f 21 "link $link_id was deleted";
22
23# Get a fresh object with nothing cached
24$bookmark = $schema->resultset("Bookmark")->find($bookmark->id);
25
26# This would create a new link row if none existed
27$bookmark->link;
28
450e6dbf 29is $schema->resultset("Link")->search({id => $link_id})->count, 0,
e60dc79f 30 'accessor did not create a link object where there was none';