File: message_builder_test.go

package info (click to toggle)
hub 2.14.2~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: sh: 1,049; ruby: 857; makefile: 89
file content (23 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package github

import (
	"testing"

	"github.com/bmizerany/assert"
)

func TestMessageBuilder_multiline_title(t *testing.T) {
	builder := &MessageBuilder{
		Message: `hello
multiline
text

the rest is
description`,
	}

	title, body, err := builder.Extract()
	assert.Equal(t, nil, err)
	assert.Equal(t, "hello multiline text", title)
	assert.Equal(t, "the rest is\ndescription", body)
}