Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

797 B
Raw Blame
use super::*;

#[test]
fn default_is_active_and_unlimited_but_explicit_limits_are_bounded() {
    let default = EntityNotificationQuery::default();
    assert_eq!(default.states, NotificationState::ACTIVE);
    assert_eq!(default.limit, None);
    assert!(!default.channel_feed_only);
    assert!(default.validate().is_ok());
    for limit in [0, 501, u32::MAX] {
        assert!(
            EntityNotificationQuery {
                limit: Some(limit),
                ..default.clone()
            }
            .validate()
            .is_err()
        );
    }
    for limit in [1, 500] {
        assert!(
            EntityNotificationQuery {
                limit: Some(limit),
                ..default.clone()
            }
            .validate()
            .is_ok()
        );
    }
}