Files
gitea-release-resource/resource_suite_test.go
JT Archie 7331e0a7ad filter by drafts in the check step
The user now opts-in to getting final or draft releases. Default
behaviour is final releases.

NOTE: There is also strict filtering on only allowing semver supported tags.

Signed-off-by: David Jahn <david.a.jahn@gmail.com>
2015-10-23 10:11:15 -04:00

38 lines
859 B
Go

package resource_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/zachgersh/go-github/github"
)
func TestGithubReleaseResource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Github Release Resource Suite")
}
func newRepositoryRelease(id int, version string) github.RepositoryRelease {
return github.RepositoryRelease{
TagName: github.String(version),
Draft: github.Bool(false),
ID: github.Int(id),
}
}
func newDraftRepositoryRelease(id int, version string) github.RepositoryRelease {
return github.RepositoryRelease{
TagName: github.String(version),
Draft: github.Bool(true),
ID: github.Int(id),
}
}
func newDraftWithNilTagRepositoryRelease(id int) github.RepositoryRelease {
return github.RepositoryRelease{
Draft: github.Bool(true),
ID: github.Int(id),
}
}