1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

fix tests

This commit is contained in:
nishiki 2015-05-11 19:15:33 +02:00
parent 9225e360b9
commit 7a222798c5
2 changed files with 15 additions and 0 deletions

View file

@ -177,4 +177,15 @@ class TestMPW < Test::Unit::TestCase
assert_equal(@fixtures['add_new']['port'].to_i, item.port)
assert_equal(@fixtures['add_new']['comment'], item.comment)
end
def test_15_search
import_file = 'files/test_import.yml'
assert(@mpw.import(import_file, :yaml))
assert_equal(2, @mpw.list.length)
assert_equal(1, @mpw.list(group: @fixtures['add_new']['group']).length)
assert_equal(1, @mpw.list(protocol: @fixtures['add_new']['protocol']).length)
assert_equal(2, @mpw.list(search: @fixtures['add_new']['name'][0..-2]).length)
end
end

4
test/tests.rb Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/ruby
require_relative 'test_mpw.rb'
require_relative 'test_item.rb'