Skip to content

Commit 8491d4a

Browse files
committed
test(cli): add tests for vertical help
1 parent 3b3bcce commit 8491d4a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/functional/cli/test_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ def test_config_error_with_help_prints_help(script_runner):
3434
assert ret.returncode == 0
3535

3636

37+
def test_global_help_prints_resources_vertically(script_runner):
38+
ret = script_runner.run("gitlab", "--help")
39+
assert (
40+
"""resource:\n \n application\n application-appearance\n""" in ret.stdout
41+
)
42+
assert ret.returncode == 0
43+
44+
45+
def test_resource_help_prints_actions_vertically(script_runner):
46+
ret = script_runner.run("gitlab", "project", "--help")
47+
assert """action:\n \n list\n get""" in ret.stdout
48+
assert ret.returncode == 0
49+
50+
3751
@pytest.mark.script_launch_mode("inprocess")
3852
@responses.activate
3953
def test_defaults_to_gitlab_com(script_runner, resp_get_project, monkeypatch):

0 commit comments

Comments
 (0)