aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cli.py')
-rw-r--r--tests/test_cli.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py
new file mode 100644
index 0000000..f2cd979
--- /dev/null
+++ b/tests/test_cli.py
@@ -0,0 +1,16 @@
+from dotfiles.cli import dispatch
+
+
+def test_dispatch():
+ """Test that the force option is handed on to the sync method."""
+
+ class MockDotfiles:
+ def sync(self, files=None, force=False):
+ assert force
+
+ class MockNamespace:
+ def __init__(self):
+ self.action = 'sync'
+ self.force = True
+
+ dispatch(MockDotfiles(), MockNamespace(), [])