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:
parent
3ac63c0c8a
commit
4e4efb8979
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue