spec/arachni/rpc/server/active_options_spec.rb in arachni-1.1 vs spec/arachni/rpc/server/active_options_spec.rb in arachni-1.2
- old
+ new
@@ -22,12 +22,15 @@
'include_path_patterns' => [ 'include me' ],
'redundant_path_patterns' => { 'redundant' => 3 },
},
'datastore' => { 'key' => 'val' },
'http' => {
- 'cookies' => { 'name' => 'value' },
- 'cookie_string' => 'name3=value3'
+ 'cookies' => {
+ 'name' => 'value',
+ 'name2' => 'value2'
+ },
+ 'cookie_string' => 'name3=value3;name4=value4'
}
}
@instance.options.set( opts )
h = @instance.options.to_h
@@ -42,11 +45,13 @@
inject({}) { |hh, (k, v)| hh[Regexp.new(k).to_s] = v.to_s; hh }
h['datastore'].should == opts['datastore']
@instance.service.cookies.map { |c| Arachni::Cookie.from_rpc_data c }.should == [
- Arachni::Cookie.new( url: opts['url'], inputs: opts['http']['cookies'] ),
- Arachni::Cookie.new( url: opts['url'], inputs: { name3: 'value3' } )
+ Arachni::Cookie.new( url: opts['url'], inputs: { 'name' => 'value' } ),
+ Arachni::Cookie.new( url: opts['url'], inputs: { 'name2' => 'value2' } ),
+ Arachni::Cookie.new( url: opts['url'], inputs: { 'name3' => 'value3' } ),
+ Arachni::Cookie.new( url: opts['url'], inputs: { 'name4' => 'value4' } )
]
end
end
end