提交 476aab95 作者: Brian Tiger Chow 提交者: Juan Batiz-Benet

rm unused tests

License: MIT
Signed-off-by: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 1065ae45
......@@ -2,7 +2,6 @@ package main
import (
"bytes"
"errors"
"testing"
"github.com/jbenet/go-ipfs/tour"
......@@ -24,48 +23,3 @@ This is where we test our beautiful command line interfaces
}
t.Log(buf.String())
}
func TestRenderTourOutputList(t *testing.T) {
t.Log(`Ensure we can successfully print the tour output when there's an
error and list of tour topics`)
listOutput := &tourOutput{
Error: errors.New("Topic 42 does not exist"),
Topics: []tour.Topic{
tour.Topic{
ID: "41",
Title: "Being one shy of the mark",
Text: "Poor thing.",
},
tour.Topic{
ID: "44",
Title: "Two shy of the mark",
Text: "Oh no.",
},
},
}
var list bytes.Buffer
if err := printTourOutput(&list, listOutput); err != nil {
t.Fatal(err)
}
t.Log(list.String())
}
func TestRenderTourOutputSingle(t *testing.T) {
t.Log(`
When there's just a single topic in the output, ensure we can render the
template`)
singleOutput := &tourOutput{
Topic: &tour.Topic{
ID: "42",
Title: "Informative!",
Text: "Compelling!",
},
}
var single bytes.Buffer
if err := printTourOutput(&single, singleOutput); err != nil {
t.Fatal(err)
}
t.Log(single.String())
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论