Skip to content

Commit

Permalink
change expected structure in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
creativeprojects committed Jun 30, 2020
1 parent 85a5d59 commit 52c74cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions config/show_test.go
Expand Up @@ -34,29 +34,29 @@ func TestShowStruct(t *testing.T) {
testData := []showStructData{
{
input: testObject{Id: 11, Name: "test"},
output: " person:\n id: 11\n name: test\n",
output: " person:\n\n id: 11\n name: test\n\n",
},
{
input: testObject{Id: 11, Person: testPerson{Name: "test"}},
output: " person:\n name: test\n id: 11\n",
output: " person:\n name: test\n\n id: 11\n\n",
},
{
input: testObject{Id: 11, Person: testPerson{Name: "test", IsValid: true}},
output: " person:\n name: test\n valid: true\n id: 11\n",
output: " person:\n name: test\n valid: true\n\n id: 11\n\n",
},
{
input: testObject{Id: 11, Pointer: &testPointer{IsValid: true}},
output: " person:\n pointer:\n valid: true\n id: 11\n",
output: " person:\n\n pointer:\n valid: true\n\n id: 11\n\n",
},
{
input: testObject{Id: 11, Person: testPerson{Properties: map[string][]string{
"list": {"one", "two", "three"},
}}},
output: " person:\n properties:\n list: one, two, three\n id: 11\n",
output: " person:\n properties:\n list: one, two, three\n\n\n id: 11\n\n",
},
{
input: testObject{Id: 11, Name: "test", Map: map[string][]string{"left": {"over"}}},
output: " person:\n id: 11\n name: test\n left:\tover\n",
output: " person:\n\n id: 11\n name: test\n left: over\n\n",
},
}

Expand Down

0 comments on commit 52c74cd

Please sign in to comment.