Skip to content

Commit 7880549

Browse files
updating tests
1 parent 6b18997 commit 7880549

File tree

2 files changed

+64
-67
lines changed

2 files changed

+64
-67
lines changed

cli_test.go

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -95,73 +95,73 @@ func TestRunCLI(t *testing.T) {
9595
{
9696
name: "No Arguments",
9797
args: []string{},
98-
expectedOutput: "╭────────────────────────────────────────────────────────\n" +
99-
"│Welcome! This tool displays data related to Pokémon! \n" +
100-
"│ \n" +
101-
"│ USAGE: \n" +
102-
"│ poke-cli [flag] \n" +
103-
"│ poke-cli <command> [flag] \n" +
104-
"│ poke-cli <command> <subcommand> [flag] \n" +
105-
"│ \n" +
106-
"│ FLAGS: \n" +
107-
"│ -h, --help Shows the help menu \n" +
108-
"│ -l, --latest Prints the latest version available \n" +
109-
"│ -v, --version Prints the current version \n" +
110-
"│ \n" +
111-
"│ COMMANDS: \n" +
112-
"│ ability Get details about an ability \n" +
113-
"│ natures Get details about Pokémon natures │\n" +
114-
"│ pokemon Get details about a specific Pokémon │\n" +
115-
"│ types Get details about a specific typing │\n" +
116-
"╰────────────────────────────────────────────────────────\n",
98+
expectedOutput: "╭────────────────────────────────────────────────────────╮\n" +
99+
"│Welcome! This tool displays data related to Pokémon! │\n" +
100+
"│ │\n" +
101+
"│ USAGE: │\n" +
102+
"│ poke-cli [flag] │\n" +
103+
"│ poke-cli <command> [flag] │\n" +
104+
"│ poke-cli <command> <subcommand> [flag] │\n" +
105+
"│ │\n" +
106+
"│ FLAGS: │\n" +
107+
"│ -h, --help Shows the help menu │\n" +
108+
"│ -l, --latest Prints the latest version available │\n" +
109+
"│ -v, --version Prints the current version │\n" +
110+
"│ │\n" +
111+
"│ COMMANDS: │\n" +
112+
"│ ability Get details about an ability │\n" +
113+
"│ natures Get details about all natures \n" +
114+
"│ pokemon Get details about a Pokémon \n" +
115+
"│ types Get details about a typing \n" +
116+
"╰────────────────────────────────────────────────────────╯\n",
117117
expectedCode: 0,
118118
},
119119
{
120120
name: "Help Flag Short",
121121
args: []string{"-h"},
122-
expectedOutput: "╭────────────────────────────────────────────────────────\n" +
123-
"│Welcome! This tool displays data related to Pokémon! \n" +
124-
"│ \n" +
125-
"│ USAGE: \n" +
126-
"│ poke-cli [flag] \n" +
127-
"│ poke-cli <command> [flag] \n" +
128-
"│ poke-cli <command> <subcommand> [flag] \n" +
129-
"│ \n" +
130-
"│ FLAGS: \n" +
131-
"│ -h, --help Shows the help menu \n" +
132-
"│ -l, --latest Prints the latest version available \n" +
133-
"│ -v, --version Prints the current version \n" +
134-
"│ \n" +
135-
"│ COMMANDS: \n" +
136-
"│ ability Get details about an ability \n" +
137-
"│ natures Get details about Pokémon natures │\n" +
138-
"│ pokemon Get details about a specific Pokémon │\n" +
139-
"│ types Get details about a specific typing │\n" +
140-
"╰────────────────────────────────────────────────────────\n",
122+
expectedOutput: "╭────────────────────────────────────────────────────────╮\n" +
123+
"│Welcome! This tool displays data related to Pokémon! │\n" +
124+
"│ │\n" +
125+
"│ USAGE: │\n" +
126+
"│ poke-cli [flag] │\n" +
127+
"│ poke-cli <command> [flag] │\n" +
128+
"│ poke-cli <command> <subcommand> [flag] │\n" +
129+
"│ │\n" +
130+
"│ FLAGS: │\n" +
131+
"│ -h, --help Shows the help menu │\n" +
132+
"│ -l, --latest Prints the latest version available │\n" +
133+
"│ -v, --version Prints the current version │\n" +
134+
"│ │\n" +
135+
"│ COMMANDS: │\n" +
136+
"│ ability Get details about an ability │\n" +
137+
"│ natures Get details about all natures \n" +
138+
"│ pokemon Get details about a Pokémon \n" +
139+
"│ types Get details about a typing \n" +
140+
"╰────────────────────────────────────────────────────────╯\n",
141141
expectedCode: 0,
142142
},
143143
{
144144
name: "Help Flag Long",
145145
args: []string{"--help"},
146-
expectedOutput: "╭────────────────────────────────────────────────────────\n" +
147-
"│Welcome! This tool displays data related to Pokémon! \n" +
148-
"│ \n" +
149-
"│ USAGE: \n" +
150-
"│ poke-cli [flag] \n" +
151-
"│ poke-cli <command> [flag] \n" +
152-
"│ poke-cli <command> <subcommand> [flag] \n" +
153-
"│ \n" +
154-
"│ FLAGS: \n" +
155-
"│ -h, --help Shows the help menu \n" +
156-
"│ -l, --latest Prints the latest version available \n" +
157-
"│ -v, --version Prints the current version \n" +
158-
"│ \n" +
159-
"│ COMMANDS: \n" +
160-
"│ ability Get details about an ability \n" +
161-
"│ natures Get details about Pokémon natures │\n" +
162-
"│ pokemon Get details about a specific Pokémon │\n" +
163-
"│ types Get details about a specific typing │\n" +
164-
"╰────────────────────────────────────────────────────────\n",
146+
expectedOutput: "╭────────────────────────────────────────────────────────╮\n" +
147+
"│Welcome! This tool displays data related to Pokémon! │\n" +
148+
"│ │\n" +
149+
"│ USAGE: │\n" +
150+
"│ poke-cli [flag] │\n" +
151+
"│ poke-cli <command> [flag] │\n" +
152+
"│ poke-cli <command> <subcommand> [flag] │\n" +
153+
"│ │\n" +
154+
"│ FLAGS: │\n" +
155+
"│ -h, --help Shows the help menu │\n" +
156+
"│ -l, --latest Prints the latest version available │\n" +
157+
"│ -v, --version Prints the current version │\n" +
158+
"│ │\n" +
159+
"│ COMMANDS: │\n" +
160+
"│ ability Get details about an ability │\n" +
161+
"│ natures Get details about all natures \n" +
162+
"│ pokemon Get details about a Pokémon \n" +
163+
"│ types Get details about a typing \n" +
164+
"╰────────────────────────────────────────────────────────╯\n",
165165
expectedCode: 0,
166166
},
167167
{
@@ -173,7 +173,7 @@ func TestRunCLI(t *testing.T) {
173173
{
174174
name: "Latest Flag",
175175
args: []string{"-l"},
176-
expectedOutput: "Latest Docker image version: v0.11.1\nLatest release tag: v0.11.1\n",
176+
expectedOutput: "Latest Docker image version: v0.12.0\nLatest release tag: v0.12.0\n",
177177
expectedCode: 0,
178178
},
179179
}

cmd/natures_test.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,12 @@ func TestNaturesCommand(t *testing.T) {
4848
{
4949
name: "Help flag",
5050
args: []string{"natures", "-h"},
51-
expectedOutput: "╭────────────────────────────────────────────────────────────╮\n" +
52-
"│Get details about Pokémon natures. │\n" +
53-
"│ │\n" +
54-
"│ USAGE: │\n" +
55-
"│ poke-cli natures [flag] │\n" +
56-
"│ │\n" +
57-
"│ FLAGS: │\n" +
58-
"│ -h, --help Prints out the help menu.│\n" +
59-
"╰────────────────────────────────────────────────────────────╯\n",
51+
expectedOutput: "╭──────────────────────────────╮\n" +
52+
"│Get details about all natures.│\n" +
53+
"│ │\n" +
54+
"│ USAGE: │\n" +
55+
"│ poke-cli natures │\n" +
56+
"╰──────────────────────────────╯\n",
6057
expectError: false,
6158
},
6259
{

0 commit comments

Comments
 (0)