diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-24 22:37:22 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-24 22:37:22 -0400 |
| commit | 0bb17bd01640492db2685e67bacac12dd54a9f59 (patch) | |
| tree | 5c8425b8e6a962e609f82a7b3f2498524d8d6c6f /src/test/fixtures/channel.rs | |
| parent | d97f8ac1858fbd46b77b541a612cc37b07fc0b5d (diff) | |
Tests for channel, invite, setup, and message deletion events.
This also found a bug! No live event was being emitted during invite accept. The only way to find out about invites was to reconnect.
Diffstat (limited to 'src/test/fixtures/channel.rs')
| -rw-r--r-- | src/test/fixtures/channel.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/fixtures/channel.rs b/src/test/fixtures/channel.rs index 8cb38ae..1fd8d23 100644 --- a/src/test/fixtures/channel.rs +++ b/src/test/fixtures/channel.rs @@ -45,6 +45,13 @@ pub fn created(event: channel::Event) -> future::Ready<Option<channel::event::Cr }) } +pub fn deleted(event: channel::Event) -> future::Ready<Option<channel::event::Deleted>> { + future::ready(match event { + channel::Event::Deleted(event) => Some(event), + channel::Event::Created(_) => None, + }) +} + pub fn fictitious() -> channel::Id { channel::Id::generate() } |
