forked from lunny/changelog
747f3cb162
Default gitea service Signed-off-by: jolheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/gitea/changelog/pulls/19 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: Guillermo Prandi <guillep2k@noreply.gitea.io>
39 lines
807 B
Go
39 lines
807 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package service
|
|
|
|
import "testing"
|
|
|
|
var gh = &GitHub{
|
|
Milestone: "1.1.0", // https://github.com/go-gitea/test_repo/milestone/2?closed=1
|
|
Repo: "go-gitea/test_repo",
|
|
}
|
|
|
|
func TestGitHubGenerate(t *testing.T) {
|
|
_, entries, err := gh.Generate()
|
|
if err != nil {
|
|
t.Log(err)
|
|
t.FailNow()
|
|
}
|
|
|
|
if len(entries) != 1 {
|
|
t.Logf("Expected 1 changelog entry, but got %d", len(entries))
|
|
t.Fail()
|
|
}
|
|
}
|
|
|
|
func TestGitHubContributors(t *testing.T) {
|
|
contributors, err := gh.Contributors()
|
|
if err != nil {
|
|
t.Log(err)
|
|
t.FailNow()
|
|
}
|
|
|
|
if len(contributors) != 1 {
|
|
t.Logf("Expected 1 contributor, but got %d", len(contributors))
|
|
t.Fail()
|
|
}
|
|
}
|