| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -277,6 +277,7 @@ def delete( # type: ignore[override] | |||
| 277 | 277 | @cli.register_custom_action( | |
| 278 | 278 | cls_names="ProjectFileManager", | |
| 279 | 279 | required=("file_path",), | |
| 280 | + optional=("ref",), | ||
| 280 | 281 | ) | |
| 281 | 282 | @exc.on_http_error(exc.GitlabGetError) | |
| 282 | 283 | def raw( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + def test_project_file_raw(gitlab_cli, project, project_file): | ||
| 2 | + cmd = ["project-file", "raw", "--project-id", project.id, "--file-path", "README"] | ||
| 3 | + ret = gitlab_cli(cmd) | ||
| 4 | + assert ret.success | ||
| 5 | + assert "Initial content" in ret.stdout | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + def test_project_file_raw_ref(gitlab_cli, project, project_file): | ||
| 9 | + cmd = [ | ||
| 10 | + "project-file", | ||
| 11 | + "raw", | ||
| 12 | + "--project-id", | ||
| 13 | + project.id, | ||
| 14 | + "--file-path", | ||
| 15 | + "README", | ||
| 16 | + "--ref", | ||
| 17 | + "main", | ||
| 18 | + ] | ||
| 19 | + ret = gitlab_cli(cmd) | ||
| 20 | + assert ret.success | ||
| 21 | + assert "Initial content" in ret.stdout | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments