From 80523b00ac17f0905781496637ceb6eef5954b75 Mon Sep 17 00:00:00 2001
From: ulif <uli@gnufix.de>
Date: Wed, 11 Nov 2015 08:27:43 +0100
Subject: [PATCH] Add test to ensure configs in $HOME are read.

By default we should read config files in user
homes.
---
 tests/test_config.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/test_config.py b/tests/test_config.py
index 95150cf..ac3b25a 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -32,3 +32,10 @@ class TestConfigModule(object):
         # we cope with no list at all
         found, config = get_configparser()
         assert found == []
+
+    def test_get_configparser_default_path(self, home_dir):
+        # a config file in $HOME is looked up by default
+        config_file = home_dir / ".diceware.ini"
+        config_file.write("\n".join(["[diceware]", "num = 3", ""]))
+        found, config = get_configparser()
+        assert found == [str(config_file)]
-- 
GitLab