github.com/covergates/covergates@v0.2.2-0.20201009050117-42ef8a19fb95/modules/scm/git_test.go (about)

     1  package scm
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/google/go-cmp/cmp"
     7  )
     8  
     9  func TestGiteaCommitQuery(t *testing.T) {
    10  	u := mustGetGiteaCommitsQuery("gitea/test", "bear")
    11  	expect := "api/v1/repos/gitea/test/commits?sha=bear"
    12  	if diff := cmp.Diff(expect, u); diff != "" {
    13  		t.Fatal(diff)
    14  	}
    15  }