Sha256: 8d41c0bdbc20faa31799d145b92efc85029a67e581c4bebf09c217e94d7ef330
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' describe SetecAstronomy::KeePass::Database do describe 'self.open' do it "creates a new instance of the databse with the file" do db = SetecAstronomy::KeePass::Database.open(TEST_DATABASE_PATH) db.should_not be_nil end end describe "unlock" do before :each do @db = SetecAstronomy::KeePass::Database.open(TEST_DATABASE_PATH) @db.should be_valid end it "returns true when the master password is correct" do @db.unlock('testmasterpassword').should be_true end it "returns false when the master password is incorrect" do @db.unlock('bad password').should be_false end end describe "an unlocked database" do before :each do @db = SetecAstronomy::KeePass::Database.open(TEST_DATABASE_PATH) @db.unlock('testmasterpassword') end it "can find entries by their title" do @db.entry("test entry").password.should == "testpassword" end it "can find groups" do @db.groups.map(&:name).sort.should == ["Internet", "eMail"] end it "can search for entries" do entries = @db.search "test" entries.first.title.should == "test entry" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
setec_astronomy-0.1.0 | spec/kee_pass/database_spec.rb |