Ensure full coverage
parent
f9fc54980a
commit
7b206d6094
|
@ -95,7 +95,12 @@ describe Rex::Proto::PJL::Client do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should return a LIST directory response" do
|
it "should return a LIST directory response" do
|
||||||
cli.fsinit("1:")
|
response = "ENTRY=1\r\nDIR\f"
|
||||||
|
tmp_sock = double("sock")
|
||||||
|
tmp_sock.stub(:put).with(an_instance_of(String))
|
||||||
|
tmp_sock.stub(:get).with.and_return(response)
|
||||||
|
tmp_cli = Rex::Proto::PJL::Client.new(tmp_sock)
|
||||||
|
tmp_cli.fsdirlist("1:").should eq('DIR')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -105,10 +110,10 @@ describe Rex::Proto::PJL::Client do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should return a file" do
|
it "should return a file" do
|
||||||
size_response = "SIZE=1337\r\nFILE\f"
|
response = "SIZE=1337\r\nFILE\f"
|
||||||
tmp_sock = double("sock")
|
tmp_sock = double("sock")
|
||||||
tmp_sock.stub(:put).with(an_instance_of(String))
|
tmp_sock.stub(:put).with(an_instance_of(String))
|
||||||
tmp_sock.stub(:get).with.and_return(size_response)
|
tmp_sock.stub(:get).with.and_return(response)
|
||||||
tmp_cli = Rex::Proto::PJL::Client.new(tmp_sock)
|
tmp_cli = Rex::Proto::PJL::Client.new(tmp_sock)
|
||||||
tmp_cli.fsupload("1:").should eq('FILE')
|
tmp_cli.fsupload("1:").should eq('FILE')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue