Skip to content

Commit

Permalink
Cleanup rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Sploder12 committed Jan 24, 2025
1 parent 52b7b40 commit ad5d54e
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tests/test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,34 +716,3 @@ TEST(Utils, check_filesystem_bytes_available_returns_non_negative)

EXPECT_GE(bytes_available, 0);
}

TEST(VaultUtils, copy_creates_new_file_and_returned_path_exists)
{
mpt::TempDir temp_dir1, temp_dir2;
auto orig_file_path = QDir(temp_dir1.path()).filePath("test_file");

mpt::make_file_with_content(orig_file_path);

auto new_file_path = mp::vault::copy(orig_file_path, temp_dir2.path());

EXPECT_TRUE(QFile::exists(new_file_path));
}

TEST(VaultUtils, copy_returns_empty_path_when_file_name_is_empty)
{
mpt::TempDir temp_dir;

auto path = mp::vault::copy("", temp_dir.path());

EXPECT_TRUE(path.isEmpty());
}

TEST(VaultUtils, copy_throws_when_file_does_not_exist)
{
mpt::TempDir temp_dir;

const QString file_name{"/foo/bar"};

MP_EXPECT_THROW_THAT(mp::vault::copy(file_name, temp_dir.path()), std::runtime_error,
mpt::match_what(StrEq(fmt::format("{} missing", file_name))));
}

0 comments on commit ad5d54e

Please sign in to comment.