Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
476aab95
Commit
476aab95
authored
Nov 13, 2014
by
Brian Tiger Chow
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm unused tests
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
1065ae45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
cmd/ipfs2/tour_test.go
cmd/ipfs2/tour_test.go
+0
-46
No files found.
cmd/ipfs2/tour_test.go
View file @
476aab95
...
...
@@ -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
())
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment