mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-21 16:41:32 +03:00
9e236e3469
The reason is that it's unclear if maybe it's there for a good reason, and I don't want to break the complex code in there.
25 lines
683 B
Rust
25 lines
683 B
Rust
use gitbutler_reference::LocalRefname;
|
|
|
|
use super::*;
|
|
|
|
// Ensures that `verify_branch` returns an error when not on the integration branch.
|
|
#[test]
|
|
fn should_fail_on_incorrect_branch() {
|
|
let Test {
|
|
repository,
|
|
project,
|
|
controller,
|
|
..
|
|
} = &Test::default();
|
|
|
|
let branch_name: LocalRefname = "refs/heads/somebranch".parse().unwrap();
|
|
repository.checkout(&branch_name);
|
|
let result = controller.list_virtual_branches(project);
|
|
|
|
let err = result.unwrap_err();
|
|
assert_eq!(
|
|
format!("{err:#}"),
|
|
"<verification-failed>: project is on refs/heads/somebranch. Please checkout gitbutler/integration to continue"
|
|
);
|
|
}
|