pub(crate) mod self_update;
pub(crate) mod xtazy_update;
pub(crate) use self_update::run_self_update;
pub(crate) use xtazy_update::run_subcommand;
use crate::cli::AutoUpdateAction;
use crate::state::DealerState;
use crate::test_support::TempProject;
fn state(temp: &TempProject) -> DealerState {
DealerState::for_home(temp.path().join("dealer-home"))
fn auto_update_status_round_trips() {
let temp = TempProject::new("xtazy-auto-update");
let state = state(&temp);
xtazy_update::auto_update(AutoUpdateAction::Status, &state)
.expect("status should pass"),
"xtazy toolchain auto-update is disabled"
state.set_xtazy_auto_update_enabled(true).unwrap();
xtazy_update::auto_update(AutoUpdateAction::Status, &state)
.expect("status should pass"),
"xtazy toolchain auto-update is enabled"