summaryrefslogtreecommitdiff
path: root/tests/functional/api/test_epics.py
blob: 073ca2ad747fdc029ee272e08c5d624c2cb120c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pytest

pytestmark = pytest.mark.gitlab_premium


def test_epics(group):
    epic = group.epics.create({"title": "Test epic"})
    epic.title = "Fixed title"
    epic.labels = ["label1", "label2"]
    epic.save()

    epic = group.epics.get(epic.iid)
    assert epic.title == "Fixed title"
    assert epic.labels == ["label1", "label2"]
    assert group.epics.list()


@pytest.mark.xfail(reason="404 on issue.id")
def test_epic_issues(epic, issue):
    assert not epic.issues.list()

    epic_issue = epic.issues.create({"issue_id": issue.id})
    assert epic.issues.list()

    epic_issue.delete()
    assert not epic.issues.list()


def test_epic_notes(epic):
    assert not epic.notes.list()

    epic.notes.create({"body": "Test note"})
    assert epic.notes.list()