feat: refactor frontend configuration
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -45,15 +45,19 @@ fn test_config_from_source_dir() {
|
||||
fn test_config_from_stdin() {
|
||||
let mut args = get_base_args();
|
||||
let ui = &BufferUi::default();
|
||||
let current_dir = get_test_data_path("cuddle-embed");
|
||||
args.push("--source");
|
||||
args.push(current_dir.to_str().unwrap());
|
||||
args.push("--config-stdin");
|
||||
let config = r#"
|
||||
project:
|
||||
owner: kjuulh
|
||||
repository: cuddle-please
|
||||
branch: main
|
||||
settings:
|
||||
api_url: https://some-example.gitea-instance
|
||||
"#;
|
||||
|
||||
Command::new_from_args_with_stdin(Some(ui), args, || Ok("please".into()))
|
||||
args.push("--config-stdin");
|
||||
Command::new_from_args_with_stdin(Some(ui), args, || Ok(config.into()))
|
||||
.execute(None)
|
||||
.unwrap();
|
||||
|
||||
assert_output(ui, "cuddle-config\n", "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user