summaryrefslogtreecommitdiff
path: root/tests
diff options
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/data/bzr-handle-patch.desktop10
-rw-r--r--tests/test_favorite_store_gsettings.cpp5
3 files changed, 13 insertions, 4 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6085fc8d9..911e44322 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,6 +9,8 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/ubuntu-software-center.desktop
${CMAKE_BINARY_DIR}/tests/data/ubuntu-software-center.desktop)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/update-manager.desktop
${CMAKE_BINARY_DIR}/tests/data/update-manager.desktop)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/bzr-handle-patch.desktop
+ ${CMAKE_BINARY_DIR}/tests/data/bzr-handle-patch.desktop)
#
# Unit tests
#
diff --git a/tests/data/bzr-handle-patch.desktop b/tests/data/bzr-handle-patch.desktop
new file mode 100644
index 000000000..900e34d8d
--- /dev/null
+++ b/tests/data/bzr-handle-patch.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Bazaar
+Comment=Apply Bazaar Bundle
+Icon=bzr-icon-64
+Exec=bzr-handle-patch %f
+NoDisplay=true
+Terminal=false
+Type=Application
+Categories=Application;Development;RevisionControl;
+MimeType=text/x-diff;text/x-patch;application/x-bazaar-merge-directive;
diff --git a/tests/test_favorite_store_gsettings.cpp b/tests/test_favorite_store_gsettings.cpp
index 82039d607..33413bd09 100644
--- a/tests/test_favorite_store_gsettings.cpp
+++ b/tests/test_favorite_store_gsettings.cpp
@@ -51,6 +51,7 @@ const char* base_store_favs[] = { BUILDDIR"/tests/data/ubuntuone-installer.deskt
};
const int n_base_store_favs = G_N_ELEMENTS(base_store_favs) - 1; /* NULL */
+const std::string other_desktop = BUILDDIR"/tests/data/bzr-handle-patch.desktop";
// Utilities
std::string const& at(FavoriteList const& favs, int index)
@@ -122,7 +123,6 @@ TEST_F(TestFavoriteStoreGSettings, TestGetFavorites)
TEST_F(TestFavoriteStoreGSettings, TestAddFavorite)
{
internal::FavoriteStoreGSettings settings(backend.Release());
- std::string other_desktop("/usr/share/applications/nautilus.desktop");
settings.AddFavorite(other_desktop, 0);
FavoriteList const& favs = settings.GetFavorites();
@@ -133,7 +133,6 @@ TEST_F(TestFavoriteStoreGSettings, TestAddFavorite)
TEST_F(TestFavoriteStoreGSettings, TestAddFavoritePosition)
{
internal::FavoriteStoreGSettings settings(backend.Release());
- std::string other_desktop("/usr/share/applications/nautilus.desktop");
settings.AddFavorite(other_desktop, 2);
FavoriteList const& favs = settings.GetFavorites();
@@ -144,7 +143,6 @@ TEST_F(TestFavoriteStoreGSettings, TestAddFavoritePosition)
TEST_F(TestFavoriteStoreGSettings,TestAddFavoriteLast)
{
internal::FavoriteStoreGSettings settings(backend.Release());
- std::string other_desktop("/usr/share/applications/nautilus.desktop");
settings.AddFavorite(other_desktop, -1);
FavoriteList const& favs = settings.GetFavorites();
@@ -155,7 +153,6 @@ TEST_F(TestFavoriteStoreGSettings,TestAddFavoriteLast)
TEST_F(TestFavoriteStoreGSettings,TestAddFavoriteOutOfRange)
{
internal::FavoriteStoreGSettings settings(backend.Release());
- std::string other_desktop("/usr/share/applications/nautilus.desktop");
FavoriteList const& favs = settings.GetFavorites();
settings.AddFavorite(other_desktop, n_base_store_favs + 1);