changelog/service/github_test.go
John Olheiser 747f3cb162
All checks were successful
continuous-integration/drone/push Build is passing
Changelog Overhaul 2 (#19)
Default gitea service

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: #19
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: Guillermo Prandi <guillep2k@noreply.gitea.io>
2020-01-24 16:30:16 +00:00

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()
}
}