tests: Convert from testify to quicktest

This commit is contained in:
Bjørn Erik Pedersen
2019-08-10 21:05:17 +02:00
parent 6027ee1108
commit 9e57182705
195 changed files with 3919 additions and 3693 deletions

View File

@@ -18,22 +18,24 @@ import (
"os"
"testing"
"github.com/stretchr/testify/require"
qt "github.com/frankban/quicktest"
)
func TestGitHubLookupCommit(t *testing.T) {
skipIfNoToken(t)
c := qt.New(t)
client := newGitHubAPI("hugo")
commit, err := client.fetchCommit("793554108763c0984f1a1b1a6ee5744b560d78d0")
require.NoError(t, err)
c.Assert(err, qt.IsNil)
fmt.Println(commit)
}
func TestFetchRepo(t *testing.T) {
skipIfNoToken(t)
c := qt.New(t)
client := newGitHubAPI("hugo")
repo, err := client.fetchRepo()
require.NoError(t, err)
c.Assert(err, qt.IsNil)
fmt.Println(">>", len(repo.Contributors))
}