use vcs_gitlab::{GitLab, GitLabApi};
async fn glab_present() -> bool {
GitLab::new().version().await.is_ok()
}
#[tokio::test]
#[ignore = "requires the glab binary"]
async fn version_mentions_glab() {
if !glab_present().await {
eprintln!("skipping: glab not installed");
return;
}
let v = GitLab::new().version().await.expect("glab version");
assert!(v.to_lowercase().contains("glab"), "unexpected: {v}");
}
#[tokio::test]
#[ignore = "requires the glab binary"]
async fn auth_status_does_not_error() {
if !glab_present().await {
eprintln!("skipping: glab not installed");
return;
}
let _authed = GitLab::new()
.auth_status()
.await
.expect("auth_status should not error");
}