Oops, $ and _ need to be in the spec.
* Repeats the random check 20 times for each spec.bug/bundler_fix
parent
6c3b667152
commit
a382b78f80
|
@ -13,12 +13,12 @@ describe Rex::Exploitation::JSObfu do
|
|||
it { should be_a String }
|
||||
it { should_not be_empty }
|
||||
|
||||
it 'is alphanumeric' do
|
||||
expect(random_var_name).to match(/\A[a-zA-Z0-9]+\Z/)
|
||||
it 'is composed of _, $, alphanumeric chars' do
|
||||
20.times { expect(jsobfu.random_var_name).to match(/\A[a-zA-Z0-9$_]+\Z/) }
|
||||
end
|
||||
|
||||
it 'does not start with a number' do
|
||||
expect(random_var_name).not_to match(/\A[0-9]/)
|
||||
20.times { expect(jsobfu.random_var_name).not_to match(/\A[0-9]/) }
|
||||
end
|
||||
|
||||
context 'when a reserved word is generated' do
|
||||
|
|
Loading…
Reference in New Issue