summaryrefslogtreecommitdiff
path: root/di_test.go
blob: c69e4f52a53893045856334a74254079da4d4d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import (
	"bytes"
	"testing"
)

func TestGreet(t *testing.T) {
	buffer := bytes.Buffer{}
	Greet(&buffer, "mo")

	got := buffer.String()
	want := "Hello, mo"

	if got != want {
		t.Errorf("got %q want %q", got, want)
	}
}