1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-09 13:36:56 +02:00

fixed template

closes #276
This commit is contained in:
Carlos Alexandro Becker 2017-07-04 09:28:26 -03:00
parent e8bdba5752
commit 5e0c55ac6b
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 12 additions and 1 deletions

View File

@ -2,8 +2,8 @@ package release
import (
"bytes"
"html/template"
"os/exec"
"text/template"
"github.com/goreleaser/goreleaser/context"
)

View File

@ -21,6 +21,17 @@ func TestDescribeBody(t *testing.T) {
assert.Contains(out.String(), "Built with go version go1.8")
}
func TestDontEscapeHTML(t *testing.T) {
var assert = assert.New(t)
var changelog = "<h1>test</h1>"
var ctx = &context.Context{
ReleaseNotes: changelog,
}
out, err := describeBody(ctx)
assert.NoError(err)
assert.Contains(changelog, out.String())
}
func TestGoVersionFails(t *testing.T) {
var assert = assert.New(t)
var path = os.Getenv("PATH")