jake 4 years ago
parent
commit
6d82751ed3
  1. 1
      src/entity/gateway/postgres/postgres.rs
  2. 1
      tests/test_shops.rs

1
src/entity/gateway/postgres/postgres.rs

@ -355,7 +355,6 @@ impl EntityGateway for PostgresGateway {
}
async fn use_mag_cell(&mut self, mag_item_id: &ItemEntityId, mag_cell_id: &ItemEntityId) {
// consume cell?
sqlx::query("insert into mag_modifier (mag, modifier) values ($1, $2);")
.bind(mag_item_id.0)
.bind(sqlx::types::Json(PgMagModifierDetail::from(mag::MagModifier::MagCell(*mag_cell_id))))

1
tests/test_shops.rs

@ -506,6 +506,7 @@ async fn test_techs_disappear_from_shop_when_bought() {
assert!(p1_items[0].item != p1_items[1].item);
}
// TOOD: this is not deterministic and can randomly fail
#[async_std::test]
async fn test_units_disappear_from_shop_when_bought() {
let mut entity_gateway = InMemoryGateway::new();

Loading…
Cancel
Save