forked from git-chglog/git-chglog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jira_test.go
43 lines (38 loc) · 1.09 KB
/
jira_test.go
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
34
35
36
37
38
39
40
41
42
43
package chglog
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestJira(t *testing.T) {
assert := assert.New(t)
config := &Config{
Options: &Options{
Processor: nil,
NextTag: "",
TagFilterPattern: "",
CommitFilters: nil,
CommitSortBy: "",
CommitGroupBy: "",
CommitGroupSortBy: "",
CommitGroupTitleMaps: nil,
HeaderPattern: "",
HeaderPatternMaps: nil,
IssuePrefix: nil,
RefActions: nil,
MergePattern: "",
MergePatternMaps: nil,
RevertPattern: "",
RevertPatternMaps: nil,
NoteKeywords: nil,
JiraUsername: "uuu",
JiraToken: "ppp",
JiraURL: "http://jira.com",
JiraTypeMaps: nil,
JiraIssueDescriptionPattern: "",
},
}
jira := NewJiraClient(config)
issue, err := jira.GetJiraIssue("fake")
assert.Nil(issue)
assert.Error(err)
}