test/commands/test_clean.rb in zold-0.20.1 vs test/commands/test_clean.rb in zold-0.20.2
- old
+ new
@@ -35,12 +35,12 @@
class TestClean < Zold::Test
def test_cleans_copies
FakeHome.new(log: test_log).run do |home|
wallet = home.create_wallet
copies = home.copies(wallet)
- copies.add('a1', 'host-1', 80, 1, Time.now - 26 * 60 * 60)
- copies.add('a2', 'host-2', 80, 2, Time.now - 26 * 60 * 60)
+ copies.add('a1', 'host-1', 80, 1, time: Time.now - 26 * 60 * 60)
+ copies.add('a2', 'host-2', 80, 2, time: Time.now - 26 * 60 * 60)
Zold::Clean.new(wallets: home.wallets, copies: copies.root, log: test_log).run(['clean', wallet.id.to_s])
assert(copies.all.empty?)
end
end
@@ -61,10 +61,10 @@
def test_cleans_copies_in_threads
FakeHome.new(log: test_log).run do |home|
wallet = home.create_wallet
copies = home.copies(wallet)
- copies.add(IO.read(wallet.path), 'host-2', 80, 2, Time.now)
+ copies.add(IO.read(wallet.path), 'host-2', 80, 2, time: Time.now)
Threads.new(20).assert do
Zold::Clean.new(wallets: home.wallets, copies: copies.root, log: test_log).run(['clean'])
end
assert_equal(1, copies.all.count)
end