Sha256: d12e34f90d877549a99a6d16883bc1b9d0cc40ef3f58c4cebdc3d7fe5b5a4a71
Contents?: true
Size: 985 Bytes
Versions: 2
Compression:
Stored size: 985 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Registration" do context Istat::Frames::RegisterRequest do it "should be possible to generate a correct password frame" do frame = Istat::Frames::RegisterRequest.new("macbook.local", "42c4e086890f9e2c1b2b7221b2422136") frame.to_s.should == "<?xml version='1.0' encoding='UTF-8'?><isr><h>macbook.local</h><duuid>42c4e086890f9e2c1b2b7221b2422136</duuid></isr>" end end context Istat::Frames::RegisterResponse do it "should be possible to parse the authentication response" do xml = %Q{<?xml version="1.0" encoding="UTF-8"?><isr pl="2" ath="1" ss="6" c="28406490" n="28406489"></isr>} frame = Istat::Frames::RegisterResponse.new(xml) frame.ss.should == 6 frame.last_uptime == 28406489 frame.uptime.should == 28406490 frame.authorize?.should be_true frame.platform.should == 2 frame.other_unix?.should be_true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
istat-0.0.3 | spec/frames/register_spec.rb |
istat-0.0.2 | spec/frames/register_spec.rb |