1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-03-19 21:04:35 +00:00

unittest: add sync empty data test

This commit is contained in:
nishiki 2014-12-31 11:30:30 +01:00
parent 3ac63c0c8a
commit 4e4efb8979

View file

@ -280,9 +280,17 @@ class TestMPW < Test::Unit::TestCase
data = [] data = []
YAML.load_file(import_file).each_value { |v| data.push(v) } YAML.load_file(import_file).each_value { |v| data.push(v) }
@mpw.sync(data, Time.now.to_i) assert(@mpw.sync(data, Time.now.to_i))
assert_equal(0, @mpw.search.length) assert_equal(0, @mpw.search.length)
end end
def test_17_sync_empty_data
assert(@mpw.import(@fixture_file, :yaml))
assert_equal(2, @mpw.search.length)
assert(@mpw.sync([], 0))
assert_equal(2, @mpw.search.length)
end
end end