Skip to content

Commit

Permalink
test view for collection
Browse files Browse the repository at this point in the history
  • Loading branch information
ModProg committed Feb 4, 2022
1 parent 382273a commit 470ddf1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/bonsaidb-macros/tests/collection.rs
@@ -1,5 +1,7 @@
use core::fmt::Debug;

use bonsaidb::core::schema::Schematic;

#[test]
fn name_only() {
use bonsaidb::core::schema::Collection;
Expand All @@ -26,7 +28,8 @@ fn views() {
pub sides: u32,
}

// TODO somehow test views
let schematic = Schematic::from_schema::<Shape>().unwrap();
assert!(schematic.view::<ShapesByNumberOfSides>().is_some());

#[derive(Debug, Clone)]
struct ShapesByNumberOfSides;
Expand Down

0 comments on commit 470ddf1

Please sign in to comment.