// use super::*; mod branch { use super::super::branch::*; use super::*; #[actix_rt::test] async fn test_find_next_commit_on_dev() { let next = git::Commit::new("current-next", "foo"); let expected = git::Commit::new("dev-next", "next-should-go-here"); let dev_commit_history = vec![ git::Commit::new("dev", "future"), expected.clone(), next.clone(), git::Commit::new("current-main", "history"), ]; let next_commit = find_next_commit_on_dev(next, dev_commit_history); assert_eq!(next_commit, Some(expected), "Found the wrong commit"); } } mod webhook { use super::super::webhook::*; #[test] fn should_split_ref() { assert_eq!(split_ref("refs/heads/next"), ("refs/heads/", "next")); } }