Sha256: d71465c129c5d70b87430ad0d2072a851c075a62d43de6031e4f13a4d7c27ac5

Contents?: true

Size: 602 Bytes

Versions: 30

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

describe RequestLogAnalyzer::Filter::Anonymize, 'anonymize request' do

  before(:each) do
    @filter = RequestLogAnalyzer::Filter::Anonymize.new(testing_format)
  end

  it "should anonimize ip" do
    @filter.filter(request(:ip => '123.123.123.123'))[:ip].should_not eql('123.123.123.123')
  end

  it "should anonimize url" do
    @filter.filter(request(:url => 'https://test.mysite.com/employees'))[:url].should eql('http://example.com/employees')
  end

  it "should fuzz durations" do
    @filter.filter(request(:duration => 100))[:duration].should_not eql(100)
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
request-log-analyzer-1.13.1 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.13.0 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.11 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.10 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.9 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.8 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.7 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.6 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.5 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.4 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.3 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.2 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.1 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.12.0 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.11.1 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.11.0 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.10.1 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.10.0 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.9.10 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.9.9 spec/unit/filter/anonymize_filter_spec.rb