Blame SOURCES/0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch

a74860
From afeedb5c932371482b4ffe7b5e98bc1d619f9594 Mon Sep 17 00:00:00 2001
a74860
From: Nicholas Guriev <guriev-ns@ya.ru>
a74860
Date: Sat, 30 Sep 2017 21:34:18 +0300
a74860
Subject: [PATCH 3/8] Fix tests for 1f8e58d51e6fb3f50f59ed2d8265f2f346ac68e6
a74860
a74860
---
a74860
 autotests/t-xdg-mime-query-default.sh | 2 ++
a74860
 autotests/t-xdg-settings.sh           | 4 ++++
a74860
 2 files changed, 6 insertions(+)
a74860
a74860
diff --git a/autotests/t-xdg-mime-query-default.sh b/autotests/t-xdg-mime-query-default.sh
a74860
index 66bb8d7..a746b1d 100755
a74860
--- a/autotests/t-xdg-mime-query-default.sh
a74860
+++ b/autotests/t-xdg-mime-query-default.sh
a74860
@@ -3,6 +3,8 @@ COMMAND_TESTED="xdg-mime query default"
a74860
 . ./test-lib.sh
a74860
 
a74860
 test_that_it reads \$XDG_CONFIG_HOME/mimeapps.list
a74860
+mock mosaic  # Default app should exist
a74860
+mock_desktop_file mosaic
a74860
 mock_default_app x-scheme-handler/http mosaic
a74860
 handler=$(run generic xdg-mime query default x-scheme-handler/http)
a74860
 assert_equal mosaic.desktop "$handler"
a74860
diff --git a/autotests/t-xdg-settings.sh b/autotests/t-xdg-settings.sh
a74860
index 7b697e4..b8255ab 100755
a74860
--- a/autotests/t-xdg-settings.sh
a74860
+++ b/autotests/t-xdg-settings.sh
a74860
@@ -12,12 +12,16 @@ assert_run gconftool-2 --get /desktop/gnome/applications/browser/exec
a74860
 for de in gnome3 cinnamon lxde mate generic; do
a74860
     test_that_it determines default browser from \
a74860
                  \$XDG_CONFIG_HOME/mimeapps.list in $de
a74860
+    mock mosaic  # Default app should exist
a74860
+    mock_desktop_file mosaic
a74860
     mock_default_app x-scheme-handler/http mosaic
a74860
     assert_equal mosaic.desktop \
a74860
                  "$(run $de xdg-settings get default-web-browser)"
a74860
 
a74860
     test_that_it determines default URL handler from \
a74860
                  \$XDG_CONFIG_HOME/mimeapps.list in $de
a74860
+    mock footorrent  # Default app should exist
a74860
+    mock_desktop_file footorrent
a74860
     mock_default_app x-scheme-handler/magnet footorrent
a74860
     assert_equal \
a74860
         footorrent.desktop \
a74860
-- 
a74860
2.14.3
a74860