test/node/test_safe_entrance.rb in zold-0.18.4 vs test/node/test_safe_entrance.rb in zold-0.18.5
- old
+ new
@@ -25,10 +25,11 @@
require_relative '../test__helper'
require_relative '../../lib/zold/wallet'
require_relative '../../lib/zold/id'
require_relative '../../lib/zold/key'
require_relative '../../lib/zold/node/safe_entrance'
+require_relative '../../lib/zold/node/soft_error'
require_relative 'fake_entrance'
# SafeEntrance test.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
@@ -38,10 +39,10 @@
FakeHome.new(log: test_log).run do |home|
wallet = home.create_wallet
amount = Zold::Amount.new(zld: 39.99)
key = Zold::Key.new(file: 'fixtures/id_rsa')
wallet.sub(amount, "NOPREFIX@#{Zold::Id.new}", key)
- assert_raises StandardError do
+ assert_raises Zold::SoftError do
Zold::SafeEntrance.new(FakeEntrance.new).push(wallet.id, IO.read(wallet.path))
end
end
end