1 use DBIx::Class::Fixtures;
3 use File::Path 'rmtree';
8 (my $schema = ExtraTest::Schema->connect(
9 'DBI:SQLite::memory:','',''))->init_schema;
11 open(my $fh, '<', 't/18-extra.t') ||
12 die "Can't open the filehandle, test is trash!";
23 my $fixtures = DBIx::Class::Fixtures
25 config_dir => 't/var/configs',
30 config => 'extra.json',
32 directory => "t/var/fixtures/photos" }),
33 'fetch dump executed okay');
35 ok my $key = $schema->resultset('Photo')->first->file;
37 ok -e $key, 'File Created';
39 ok $schema->resultset('Photo')->delete;
41 ok ! -e $key, 'File Deleted';
47 directory => "t/var/fixtures/photos"}),
50 is $key, $schema->resultset('Photo')->first->file,
53 ok -e $key, 'File Restored';
59 rmtree 't/var/fixtures/photos';