[TEST] Do not try to use the bookId if it is wrong.

This commit is contained in:
Matthieu Gautier 2021-01-20 16:37:22 +01:00
parent f5d9a3714d
commit 17bc1a3e1a
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ TEST(ManagerTest, addBookFromPathAndGetIdTest)
kiwix::Manager manager = kiwix::Manager(&lib);
auto bookId = manager.addBookFromPathAndGetId("./test/example.zim");
EXPECT_NE(bookId, "");
ASSERT_NE(bookId, "");
kiwix::Book book = lib.getBookById(bookId);
EXPECT_EQ(book.getPath(), computeAbsolutePath("", "./test/example.zim"));
@ -22,4 +22,4 @@ TEST(ManagerTest, addBookFromPathAndGetIdTest)
auto savedPath = computeAbsolutePath(removeLastPathElement(manager.writableLibraryPath), pathToSave);
EXPECT_EQ(book.getPath(), savedPath);
EXPECT_EQ(book.getUrl(), url);
}
}