github.com/trevoraustin/hub@v2.2.0-preview1.0.20141105230840-96d8bfc654cc+incompatible/commands/pull_request_tpl_test.go (about)

     1  package commands
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/bmizerany/assert"
     7  )
     8  
     9  func TestRenderPullRequestTpl(t *testing.T) {
    10  	msg, err := renderPullRequestTpl("init", "#", "base", "head", "one\ntwo")
    11  	assert.Equal(t, nil, err)
    12  
    13  	expMsg := `init
    14  
    15  # Requesting a pull to base from head
    16  #
    17  # Write a message for this pull request. The first block
    18  # of text is the title and the rest is description.
    19  #
    20  # Changes:
    21  #
    22  # one
    23  # two`
    24  	assert.Equal(t, expMsg, msg)
    25  }