diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/for_each_ref_with_path_component | bin | 0 -> 72 bytes | |||
-rw-r--r-- | test/git/test_head.py | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/fixtures/for_each_ref_with_path_component b/test/fixtures/for_each_ref_with_path_component Binary files differnew file mode 100644 index 00000000..717c4203 --- /dev/null +++ b/test/fixtures/for_each_ref_with_path_component diff --git a/test/git/test_head.py b/test/git/test_head.py index 669665c0..b9b1ac4f 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -21,3 +21,12 @@ class TestHead(object): assert_true(git.called) assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + + @patch_object(Git, '_call_process') + def test_ref_with_path_component(self, git): + git.return_value = fixture('for_each_ref_with_path_component') + head = self.repo.heads[0] + + assert_equal('refactoring/feature1', head.name) + assert_true(git.called) + assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) |