-
Notifications
You must be signed in to change notification settings - Fork 0
/
githubApiClient_test.go
37 lines (25 loc) · 1.06 KB
/
githubApiClient_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
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSetBuildStatus(t *testing.T) {
t.Run("Succeeded", func(t *testing.T) {
// act
githubAPIClient := newGithubAPIClient()
err := githubAPIClient.SetBuildStatus("v1.1c85af3bbfbe393055c74a22b638b4a52238d05d", "estafette/estafette-extension-bitbucket-status", "a66df8a71b566e712cd9e4096469ae903d05ad12", "succeeded")
assert.Nil(t, err)
})
// t.Run("Failed", func(t *testing.T) {
// // act
// githubAPIClient := newGithubAPIClient()
// err := githubAPIClient.SetBuildStatus("v1.1c85af3bbfbe393055c74a22b638b4a52238d05d", "estafette/estafette-extension-bitbucket-status", "a66df8a71b566e712cd9e4096469ae903d05ad12", "failed")
// assert.Nil(t, err)
// })
// t.Run("Pending", func(t *testing.T) {
// // act
// githubAPIClient := newGithubAPIClient()
// err := githubAPIClient.SetBuildStatus("v1.1c85af3bbfbe393055c74a22b638b4a52238d05d", "estafette/estafette-extension-bitbucket-status", "a66df8a71b566e712cd9e4096469ae903d05ad12", "pending")
// assert.Nil(t, err)
// })
}