spec/parser_spec.rb in lastpass-1.1.0 vs spec/parser_spec.rb in lastpass-1.2.0

- old
+ new

@@ -183,9 +183,23 @@ "62999647203566877832873138065626190040996517274" + "418161068665712298519808863" end end + describe ".parse_secure_note_server" do + let(:url) { "url" } + let(:username) { "username" } + let(:password) { "password" } + let(:notes) { "Hostname:#{url}\nUsername:#{username}\nPassword:#{password}" } + + it "returns parsed values" do + result = LastPass::Parser.parse_secure_note_server notes + expect(result[0]).to eq url + expect(result[1]).to eq username + expect(result[2]).to eq password + end + end + describe ".read_chunk" do it "returns a chunk" do with_chunk_hex "ABCD", "DEADBEEF", padding do |io| expect(LastPass::Parser.read_chunk io).to eq LastPass::Chunk.new("ABCD", "DEADBEEF".decode_hex) expect(io.pos).to eq 12