Sha256: c6bd1760797b3f1f89c75814579be976f9104b024a251968153b71250f3af1f2

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 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

2 entries across 2 versions & 1 rubygems

Version Path
request-log-analyzer-1.13.4 spec/unit/filter/anonymize_filter_spec.rb
request-log-analyzer-1.13.3 spec/unit/filter/anonymize_filter_spec.rb