hive-forge: unit-test blocking_open_count
This commit is contained in:
parent
a3f14f5126
commit
bd4906ab17
1 changed files with 17 additions and 0 deletions
|
|
@ -338,6 +338,23 @@ mod tests {
|
||||||
assert_eq!(dep_progress(&deps), Some((0, 2)));
|
assert_eq!(dep_progress(&deps), Some((0, 2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn blocking_open_count_zero_when_none_blocking() {
|
||||||
|
assert_eq!(blocking_open_count(&[]), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn blocking_open_count_ignores_closed_ones() {
|
||||||
|
let blocking = [dep("closed"), dep("closed")];
|
||||||
|
assert_eq!(blocking_open_count(&blocking), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn blocking_open_count_counts_only_open_ones() {
|
||||||
|
let blocking = [dep("closed"), dep("open"), dep("open")];
|
||||||
|
assert_eq!(blocking_open_count(&blocking), 2);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn kind_query_types_match_forgejo_enum() {
|
fn kind_query_types_match_forgejo_enum() {
|
||||||
// The forge accepts only `issues` / `pulls` for the `type`
|
// The forge accepts only `issues` / `pulls` for the `type`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue