Skip to content

Commit c384814

Browse files
author
Nabil BENDAFI
committed
Update Protocole::V06::Extended test
1 parent 5414bd7 commit c384814

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/test_protocol.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
require 'common'
22

33
class ProtocolTest < Net::SFTP::TestCase
4-
1.upto(6) do |version|
4+
1.upto(5) do |version|
55
define_method("test_load_version_#{version}_should_return_v#{version}_driver") do
66
session = stub('session', :logger => nil)
77
driver = Net::SFTP::Protocol.load(session, version)
88
assert_instance_of Net::SFTP::Protocol.const_get("V%02d" % version)::Base, driver
99
end
1010
end
1111

12+
def test_load_version_6_should_return_v6_driver
13+
session = stub('session', :logger => nil)
14+
driver = Net::SFTP::Protocol.load(session, 6)
15+
assert_instance_of Net::SFTP::Protocol.const_get("V06" % version)::Extended, driver
16+
end
17+
1218
def test_load_version_7_should_be_unsupported
1319
assert_raises(NotImplementedError) do
1420
Net::SFTP::Protocol.load(stub('session'), 7)
1521
end
1622
end
17-
end
23+
end

0 commit comments

Comments
 (0)