use robson_plugin_implementation_workflow::workers::BitbucketListWorker;

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

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

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

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