worktree-io 0.17.6

A CLI tool to open GitHub issues as git worktree workspaces
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;
use crate::issue::IssueRef;

#[test]
fn test_open_or_create_existing() {
    let issue = IssueRef::GitHub {
        owner: "__test_wt__".into(),
        repo: "__test_wt__".into(),
        number: 9999,
    };
    let path = issue.temp_path();
    std::fs::create_dir_all(&path).unwrap();
    let ws = Workspace::open_or_create(issue).unwrap();
    assert!(!ws.created);
    std::fs::remove_dir_all(&path).ok();
}