forked from shuheiktgw/go-travis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactive_integration_test.go
42 lines (31 loc) · 1.01 KB
/
active_integration_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
// Copyright (c) 2015 Ableton AG, Berlin. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build integration
package travis
import (
"context"
"net/http"
"testing"
)
func TestActiveService_Integration_FindByOwner(t *testing.T) {
opt := ActiveOption{Include: []string{"active.builds"}}
_, res, err := integrationClient.Active.FindByOwner(context.TODO(), integrationGitHubOwner, &opt)
if err != nil {
t.Fatalf("unexpected error occured: %s", err)
}
if res.StatusCode != http.StatusOK {
t.Fatalf("invalid http status: %s", res.Status)
}
}
func TestActiveService_Integration_FindByGitHubId(t *testing.T) {
opt := ActiveOption{Include: []string{"active.builds"}}
_, res, err := integrationClient.Active.FindByGitHubId(context.TODO(), integrationGitHubOwnerId, &opt)
if err != nil {
t.Fatalf("unexpected error occured: %s", err)
}
if res.StatusCode != http.StatusOK {
t.Fatalf("invalid http status: %s", res.Status)
}
}