chiark / gitweb /
specs: Test that loading works, including pieces
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 May 2021 00:40:28 +0000 (01:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 May 2021 00:41:59 +0000 (01:41 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-bundles.rs

index 05dbbffd6f7c60126309751c2089f3d2587e8b36..7fbb71c5c78d1e3f8a38bf3a4c4d8d234c7106fb 100644 (file)
@@ -26,6 +26,16 @@ impl Ctx {
         }],
         None,
       )?;
+
+      let alice = ctx.connect_player(&ctx.alice)?;
+      let pieces = alice.pieces::<PIA>()?;
+      dbgc!(&pieces);
+      for expect in &["a purple knight", "a yellow bishop"] {
+        pieces.iter().find(
+          |p| p.info["desc"].as_str() == Some(expect)
+        ).expect(expect);
+      }
+
       Ok(())
     })?;
   }