Skip to content

Commit b12797e

Browse files
committed
CATalog test working again :)
1 parent f7f2959 commit b12797e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/drivers.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ mod tests {
754754
ctx,
755755
offer,
756756
initial_registration_price,
757-
catalog_constants,
757+
catalog_constants.with_price_singleton(price_singleton_launcher_id),
758758
&TESTNET11_CONSTANTS,
759759
)?;
760760

@@ -764,8 +764,7 @@ mod tests {
764764

765765
let mut slots: Vec<Slot<CatalogSlotValue>> = slots.into();
766766
for i in 0..7 {
767-
println!("i: {}", i); // TODO: debug
768-
// create precommit coin
767+
// create precommit coin
769768
let reg_amount = if i % 2 == 1 {
770769
test_price_schedule[i / 2]
771770
} else {
@@ -914,12 +913,7 @@ mod tests {
914913
let solution_program = ctx.serialize(&NodePtr::NIL)?;
915914
ctx.insert(CoinSpend::new(funds_coin, funds_program, solution_program));
916915

917-
let spends = ctx.take();
918-
// todo: debug
919-
let spends = spends.clone();
920-
print_spend_bundle_to_file(spends.clone(), Signature::default(), "sb.debug");
921-
sim.spend_coins(spends, &[user_sk.clone()])?;
922-
println!("spent catalog :)"); // TODO: debug
916+
sim.spend_coins(ctx.take(), &[user_sk.clone()])?;
923917

924918
slots.retain(|s| *s != left_slot && *s != right_slot);
925919
slots.extend(new_slots);
@@ -929,7 +923,7 @@ mod tests {
929923

930924
assert_eq!(
931925
catalog.info.state.registration_price,
932-
test_price_schedule[3], // 0, 2, 4, 6 updated the price
926+
test_price_schedule[2], // 1, 3, 5 updated the price
933927
);
934928

935929
Ok(())

0 commit comments

Comments
 (0)