summaryrefslogtreecommitdiffstats
path: root/t/09_find_archives.t
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-08-19 14:48:47 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-08-19 14:48:47 +0200
commit13f51c2044fb22f6b3cb8c674a23fe636f7fb33d (patch)
treedc7d9cc7aabff00fd59f1a255faf4c1ce581e65b /t/09_find_archives.t
parentdcb88a73de56ed32368ebbf9b22053b2c1b1c89b (diff)
downloadApp-BorgRestore-13f51c2044fb22f6b3cb8c674a23fe636f7fb33d.tar.gz
App-BorgRestore-13f51c2044fb22f6b3cb8c674a23fe636f7fb33d.tar.xz
Reorganize tests
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 't/09_find_archives.t')
-rw-r--r--t/09_find_archives.t51
1 files changed, 0 insertions, 51 deletions
diff --git a/t/09_find_archives.t b/t/09_find_archives.t
deleted file mode 100644
index 7b1fc0f..0000000
--- a/t/09_find_archives.t
+++ /dev/null
@@ -1,51 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-use Test::MockObject;
-use Test::Differences;
-use Test::Exception;
-
-use App::BorgRestore;
-use App::BorgRestore::DB;
-use Log::Any::Adapter ('TAP');
-
-my $db = App::BorgRestore::DB->new(":memory:", 0);
-
-my $app = App::BorgRestore->new_no_defaults({db => $db});
-
-$db->add_archive_name("test1");
-my $archive_id1 = $db->get_archive_id("test1");
-$db->add_archive_name("test2");
-my $archive_id2 = $db->get_archive_id("test2");
-$db->add_archive_name("test3");
-my $archive_id3 = $db->get_archive_id("test3");
-$db->add_archive_name("test4");
-my $archive_id4 = $db->get_archive_id("test4");
-
-$db->add_path($archive_id1, "test/path", 5);
-$db->add_path($archive_id1, "test/foo", 4);
-$db->add_path($archive_id1, "test", 5);
-
-$db->add_path($archive_id2, "test/path", 5);
-$db->add_path($archive_id2, "test", 5);
-
-$db->add_path($archive_id3, "test/path", 10);
-$db->add_path($archive_id3, "test/foo", 4);
-$db->add_path($archive_id3, "test", 10);
-
-eq_or_diff($app->find_archives('test/path'), [
- {
- archive => 'test1',
- modification_time => 5
- },
- {
- archive => 'test3',
- modification_time => 10
- },
- ]);
-
-dies_ok {$app->find_archives('test/nope')};
-is ($@, "Path 'test/nope' not found in any archive.\n");
-
-done_testing;