add test for found issue
parent
c13d39b066
commit
e86e6fe357
@ -0,0 +1,22 @@
|
|||||||
|
import pytest
|
||||||
|
from pathlib import Path
|
||||||
|
from src.main.python.ddadevops.domain import (
|
||||||
|
ReleaseType,
|
||||||
|
MixinType,
|
||||||
|
)
|
||||||
|
from src.test.python.domain.helper import (
|
||||||
|
BuildFileRepositoryMock,
|
||||||
|
GitApiMock,
|
||||||
|
build_devops,
|
||||||
|
)
|
||||||
|
from src.main.python.ddadevops.application import ReleaseService
|
||||||
|
|
||||||
|
def test_sould_update_release_type():
|
||||||
|
sut = ReleaseService(GitApiMock(), BuildFileRepositoryMock("build.py"))
|
||||||
|
devops = build_devops({})
|
||||||
|
release = devops.mixins[MixinType.RELEASE]
|
||||||
|
sut.update_release_type(release, "MAJOR")
|
||||||
|
assert ReleaseType.MAJOR == release.release_type
|
||||||
|
|
||||||
|
with pytest.raises(Exception):
|
||||||
|
sut.update_release_type(release, "NOT_EXISTING")
|
Loading…
Reference in New Issue