use robson_plugin_implementation_workflow::workers::RepoListWorker;

#[test]
fn repo_list_pattern_matches_slash_repo_list() {
    let re = regex::Regex::new(RepoListWorker::PATTERN).unwrap();
    assert!(re.is_match("/repo list"));
}

#[test]
fn repo_list_pattern_matches_with_bot_mention() {
    let re = regex::Regex::new(RepoListWorker::PATTERN).unwrap();
    assert!(re.is_match("<@U12345> /repo list"));
}

#[test]
fn repo_list_pattern_does_not_match_task_list() {
    let re = regex::Regex::new(RepoListWorker::PATTERN).unwrap();
    assert!(!re.is_match("/task list"));
}

#[test]
fn repo_list_pattern_matches_case_insensitive() {
    let re = regex::Regex::new(RepoListWorker::PATTERN).unwrap();
    assert!(re.is_match("/REPO LIST"));
}
