blob: 25918657e8b93cb852231f30ea0ef7d5b043906d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package jira
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestWebhookJIRAURL(t *testing.T) {
var w Webhook
w.Issue.Self = "http://localhost:8080/rest/api/2/issue/10006"
assert.Equal(t, "http://localhost:8080", w.JIRAURL())
w.Issue.Self = "http://localhost:8080/foo/bar/rest/api/2/issue/10006"
assert.Equal(t, "http://localhost:8080/foo/bar", w.JIRAURL())
}
|