pull-requests: add merge validation to prevent merges to protected branches.
This commit is contained in:
parent
16bc6cc415
commit
6458ef9105
6 changed files with 38 additions and 17 deletions
|
|
@ -252,8 +252,9 @@ class TestCreatePullRequestApi(object):
|
|||
id_, params = build_data(
|
||||
self.apikey_regular, 'create_pull_request', **data)
|
||||
response = api_call(self.app, params)
|
||||
expected_message = 'The specified branch `{}` does not exist'.format(
|
||||
branch_name)
|
||||
expected_message = 'The specified value:{type}:`{name}` ' \
|
||||
'does not exist, or is not allowed.'.format(type='branch',
|
||||
name=branch_name)
|
||||
assert_error(id_, expected_message, given=response.body)
|
||||
|
||||
@pytest.mark.backends("git", "hg")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue