Add tests for check pre release
This commit is contained in:
@@ -15,26 +15,34 @@ func TestGithubReleaseResource(t *testing.T) {
|
||||
|
||||
func newRepositoryRelease(id int, version string) *github.RepositoryRelease {
|
||||
return &github.RepositoryRelease{
|
||||
TagName: github.String(version),
|
||||
Draft: github.Bool(false),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
TagName: github.String(version),
|
||||
Draft: github.Bool(false),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
}
|
||||
}
|
||||
|
||||
func newPreReleaseRepositoryRelease(id int, version string) *github.RepositoryRelease {
|
||||
return &github.RepositoryRelease{
|
||||
TagName: github.String(version),
|
||||
Draft: github.Bool(false),
|
||||
Prerelease: github.Bool(true),
|
||||
ID: github.Int(id),
|
||||
}
|
||||
}
|
||||
func newDraftRepositoryRelease(id int, version string) *github.RepositoryRelease {
|
||||
return &github.RepositoryRelease{
|
||||
TagName: github.String(version),
|
||||
Draft: github.Bool(true),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
TagName: github.String(version),
|
||||
Draft: github.Bool(true),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
}
|
||||
}
|
||||
|
||||
func newDraftWithNilTagRepositoryRelease(id int) *github.RepositoryRelease {
|
||||
return &github.RepositoryRelease{
|
||||
Draft: github.Bool(true),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
Draft: github.Bool(true),
|
||||
Prerelease: github.Bool(false),
|
||||
ID: github.Int(id),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user