spec/plugins/cookie_collector_spec.rb in arachni-0.4.5.2 vs spec/plugins/cookie_collector_spec.rb in arachni-0.4.6

- old
+ new

@@ -27,6 +27,23 @@ end oks.should == 3 end + + context 'when a filter has been specified' do + it 'only logs cookies that match it' do + name = name_from_filename + + options.plugins[name] = { + 'filter' => 'followed' + } + + run + + results = results_for( name ) + results.size.should == 2 + results.map { |r| r[:cookies].keys }.flatten. + uniq.sort.should == %w(link_followed) + end + end end