The world's most clever kitty cat
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Tests for returning None

Ben C dd94b59a a25194c1

+17
+17
src/brain.rs
··· 323 323 } 324 324 325 325 #[test] 326 + fn none_on_empty() { 327 + let mut brain = Brain::default(); 328 + 329 + let reply = brain.respond("hello", false, false, None); 330 + assert_eq!(reply, None); 331 + } 332 + 333 + #[test] 334 + fn none_on_end() { 335 + let mut brain = Brain::default(); 336 + brain.ingest("world hello"); 337 + 338 + let reply = brain.respond("hello", false, false, None); 339 + assert_eq!(reply, None); 340 + } 341 + 342 + #[test] 326 343 fn long_chain() { 327 344 const LETTERS: &str = "abcdefghijklmnopqrstuvwxyz"; 328 345 let msg = LETTERS