From 16eec288035b56874b77c542cb7cbaf80b641a89 Mon Sep 17 00:00:00 2001 From: Jay Sweeney Date: Sat, 9 Nov 2013 13:24:04 +1000 Subject: Fixes #22: Ensure --force option is handed on --- test_dotfiles.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test_dotfiles.py') diff --git a/test_dotfiles.py b/test_dotfiles.py index b5521d2..761496e 100755 --- a/test_dotfiles.py +++ b/test_dotfiles.py @@ -9,6 +9,7 @@ import tempfile import unittest from dotfiles import core +from dotfiles import cli from dotfiles.utils import is_link_to @@ -62,6 +63,14 @@ class DotfilesTestCase(unittest.TestCase): os.path.join(self.homedir, '.lastpass'), '/tmp') + def test_dispatch(self): + """Test that the force option is handed on to the sync method.""" + class MockDotfiles(object): + def sync(self, files=None, force=False): + assert bool(force) + dotfiles = MockDotfiles() + cli.dispatch(dotfiles, 'sync', True, []) + def test_move_repository(self): """Test the move() method for a Dotfiles repository.""" -- cgit v1.2.3