Make sure fail case is correct
`rand(1000)` would return 0 one in a thousand times, causing this test to randomly fail at that intervalbug/bundler_fix
parent
8a9027b21d
commit
08a7acef3f
|
@ -84,7 +84,7 @@ shared_examples_for 'Metasploit::Framework::LoginScanner::Base' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'is not valid for a number greater than 65535' do
|
it 'is not valid for a number greater than 65535' do
|
||||||
login_scanner.port = rand(1000) + 65535
|
login_scanner.port = 65536
|
||||||
expect(login_scanner).to_not be_valid
|
expect(login_scanner).to_not be_valid
|
||||||
expect(login_scanner.errors[:port]).to include "must be less than or equal to 65535"
|
expect(login_scanner.errors[:port]).to include "must be less than or equal to 65535"
|
||||||
end
|
end
|
||||||
|
@ -332,4 +332,4 @@ shared_examples_for 'Metasploit::Framework::LoginScanner::Base' do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue