Skip to content

Commit

Permalink
Integration test asserting setting and reading forge ids
Browse files Browse the repository at this point in the history
  • Loading branch information
krlvi committed Oct 29, 2024
1 parent 6d0f9fe commit 1384e90
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use gitbutler_branch::BranchCreateRequest;
use gitbutler_patch_reference::{ForgeIdentifier, GitHubIdentifier};
use gitbutler_reference::LocalRefname;

use super::*;
Expand Down Expand Up @@ -50,7 +51,7 @@ fn integration() {
project,
&branch_name,
None,
None,
Some(ForgeIdentifier::GitHub(GitHubIdentifier { pr_number: 123 })),
)
.unwrap();

Expand Down Expand Up @@ -100,6 +101,11 @@ fn integration() {
.find(|branch| branch.id == branch_id)
.unwrap();

assert_eq!(
branch.series.first().unwrap().forge_ids.first().unwrap(),
&ForgeIdentifier::GitHub(GitHubIdentifier { pr_number: 123 })
);

assert!(branch.commits[0].is_remote);
assert!(branch.commits[0].is_integrated);
assert!(branch.commits[1].is_remote);
Expand Down

0 comments on commit 1384e90

Please sign in to comment.