mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-04-13 12:05:47 +00:00
14 lines
405 B
Ruby
14 lines
405 B
Ruby
require 'spec_helper'
|
|
require 'ostruct'
|
|
|
|
describe GrapeLogging::Loggers::RequestHeaders do
|
|
let(:mock_request) do
|
|
OpenStruct.new(env: {HTTP_REFERER: 'http://example.com', HTTP_ACCEPT: 'text/plain'})
|
|
end
|
|
|
|
it 'strips HTTP_ from the parameter' do
|
|
expect(subject.parameters(mock_request, nil)).to eq({
|
|
headers: {'Referer' => 'http://example.com', 'Accept' => 'text/plain'}
|
|
})
|
|
end
|
|
end
|