Add specs for Rex::Proto::Kerberos::CredentialCache::Time

bug/bundler_fix
jvazquez-r7 2014-12-18 17:53:42 -06:00
parent d53f5668a2
commit 0d464a7ff8
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# -*- coding:binary -*-
require 'spec_helper'
require 'rex/proto/kerberos'
describe Rex::Proto::Kerberos::CredentialCache::Time do
subject(:time) do
described_class.new
end
let(:sample) do
"\x00\x00\x00\x00\x00\x00\x00\x01" +
"\x00\x00\x00\x02\x00\x00\x00\x03"
end
describe "#encode" do
it "encodes Rex::Proto::Kerberos::CredentialCache::Principal correctly" do
time.auth_time = 0
time.start_time = 1
time.end_time = 2
time.renew_till = 3
expect(time.encode).to eq(sample)
end
end
end