mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-26 23:59:19 +03:00
update test case to assert the right identity
This commit is contained in:
parent
8b410a3b30
commit
5ce2de20f4
@ -74,10 +74,19 @@ fn two_vbranches_in_workspace_one_commit() -> Result<()> {
|
||||
}),
|
||||
)?;
|
||||
assert_eq!(list.len(), 1, "only one of these is *not* applied");
|
||||
|
||||
let virtual_branch_state = VirtualBranchesHandle::new(ctx.project().gb_dir());
|
||||
let unapplied = virtual_branch_state.list_all_branches().unwrap();
|
||||
dbg!(&unapplied);
|
||||
let unapplied = unapplied
|
||||
.iter()
|
||||
.find(|stack| stack.name == "virtual")
|
||||
.unwrap();
|
||||
|
||||
assert_equal(
|
||||
&list[0],
|
||||
ExpectedBranchListing {
|
||||
identity: "virtual".into(),
|
||||
identity: (unapplied.source_refname.as_ref().unwrap().branch().unwrap()).into(),
|
||||
virtual_branch_given_name: Some("virtual"),
|
||||
virtual_branch_in_workspace: false,
|
||||
has_local: true,
|
||||
@ -229,4 +238,5 @@ mod util {
|
||||
Ok(branches)
|
||||
}
|
||||
}
|
||||
use gitbutler_stack::VirtualBranchesHandle;
|
||||
pub use util::{assert_equal, init_env, list_branches, project_ctx, ExpectedBranchListing};
|
||||
|
Loading…
Reference in New Issue
Block a user