зеркало из https://github.com/mislav/hub.git
26 строки
449 B
Go
26 строки
449 B
Go
package commands
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/bmizerany/assert"
|
|
)
|
|
|
|
func TestRenderPullRequestTpl(t *testing.T) {
|
|
msg, err := renderPullRequestTpl("init", "#", "base", "head", "one\ntwo")
|
|
assert.Equal(t, nil, err)
|
|
|
|
expMsg := `init
|
|
|
|
# Requesting a pull to base from head
|
|
#
|
|
# Write a message for this pull request. The first block
|
|
# of text is the title and the rest is description.
|
|
#
|
|
# Changes:
|
|
#
|
|
# one
|
|
# two`
|
|
assert.Equal(t, expMsg, msg)
|
|
}
|