Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test-case for GitFlow.is_merged_into() with non-existing source c…

…ommit.
  • Loading branch information...
commit 63c81ddb70397c2e267c92f08ecbc444bdb278ba 1 parent b875e1f
@htgoebel authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/gitflow/test_core.py
View
8 tests/gitflow/test_core.py
@@ -20,7 +20,7 @@
from gitflow.branches import BranchManager
from gitflow.exceptions import (BranchExistsError, NotInitialized,
NoSuchBranchError, NoSuchRemoteError,
- MergeConflict)
+ MergeConflict, BadObjectError)
from tests.helpers import (copy_from_fixture, remote_clone_from_fixture,
fake_commit, all_commits, set_gnupg_home)
from tests.helpers.factory import create_sandbox, create_git_repo
@@ -454,6 +454,12 @@ def test_gitflow_is_merged_into(self):
self.assertFalse(gitflow.is_merged_into('HEAD', 'devel'))
self.assertFalse(gitflow.is_merged_into(self.repo.head, 'devel'))
+ @copy_from_fixture('sample_repo')
+ def test_gitflow_is_merged_into_non_existing_source(self):
+ gitflow = GitFlow(self.repo).init()
+ self.assertRaisesRegexp(BadObjectError, 'feat/ever',
+ gitflow.is_merged_into ,'feat/ever', 'devel')
+
@remote_clone_from_fixture('sample_repo')
def test_gitflow_is_merged_into_remote(self):
gitflow = GitFlow(self.repo).init()

0 comments on commit 63c81dd

Please sign in to comment.
Something went wrong with that request. Please try again.