test/zold/stress/test_pmnts.rb in zold-stress-0.5.0 vs test/zold/stress/test_pmnts.rb in zold-stress-0.5.1

- old
+ new

@@ -59,12 +59,12 @@ log: test_log, vlog: test_log ).send assert_equal(1, sent.count) assert_equal(id, sent[0][:source]) assert_equal(Zold::Id::ROOT, sent[0][:target]) - assert_equal(Zold::Amount.new(zld: 3.5), wallets.find(id, &:balance)) - assert_equal(Zold::Amount.new(zld: -3.5), wallets.find(Zold::Id::ROOT, &:balance)) + assert_equal(Zold::Amount.new(zld: 3.5), wallets.acq(id, &:balance)) + assert_equal(Zold::Amount.new(zld: -3.5), wallets.acq(Zold::Id::ROOT, &:balance)) end end def test_pays Dir.mktmpdir do |home| @@ -73,11 +73,11 @@ ids = [] 6.times do id = Zold::Create.new(wallets: wallets, log: test_log).run( ['create', '--public-key=fixtures/id_rsa.pub', Zold::Id.new.to_s, '--network=test'] ) - wallets.find(id) do |w| + wallets.acq(id) do |w| w.add(Zold::Txn.new(1, Time.now, Zold::Amount.new(zld: 1.0), 'NOPREFIX', Zold::Id.new, '-')) end ids << id end sent = Zold::Stress::Pmnts.new( @@ -87,9 +87,9 @@ stats: Zold::Stress::Stats.new, opts: test_opts('--batch=20'), log: test_log, vlog: test_log ).send assert_equal(20, sent.count) - assert_equal(46, wallets.all.map { |id| wallets.find(id) { |w| w.txns.count } }.inject(&:+)) + assert_equal(46, wallets.all.map { |id| wallets.acq(id) { |w| w.txns.count } }.inject(&:+)) end end end