Skip to content

Commit

Permalink
add missing header to specs
Browse files Browse the repository at this point in the history
  • Loading branch information
bartes committed Jul 9, 2024
1 parent f2dd013 commit 6154471
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/integration/rails/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
end
let(:now) { Time.now }
let(:headers) { { 'HTTP_AUTHORIZATION' => 'Basic 123', 'HTTP_X_FORWARDED_FOR' => '5.5.5.5, 1.2.3.4' } }
let(:headers) { { 'HTTP_AUTHORIZATION' => 'Basic 123', 'HTTP_X_FORWARDED_FOR' => '5.5.5.5, 1.2.3.4', 'HTTP_CONTENT_LENGTH' => '0' } }

before do
Timecop.freeze(now)
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/castle/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
'/',
'HTTP_USER_AGENT' => ua,
'HTTP_X_FORWARDED_FOR' => ip,
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh"
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh",
'HTTP_CONTENT_LENGTH' => '0'
)
end
let(:request) { Rack::Request.new(env) }
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/castle/context/get_default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
'HTTP_X_FORWARDED_FOR' => ip,
'HTTP_ACCEPT_LANGUAGE' => 'en',
'HTTP_USER_AGENT' => 'test',
'HTTP_COOKIE' => "__cid=#{client_id};other=efgh"
'HTTP_COOKIE' => "__cid=#{client_id};other=efgh",
'HTTP_CONTENT_LENGTH' => '0'
)
end
let(:request) { Rack::Request.new(env) }
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/castle/context/prepare_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
'/',
'HTTP_USER_AGENT' => ua,
'HTTP_X_FORWARDED_FOR' => ip,
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh"
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh",
'HTTP_CONTENT_LENGTH' => '0'
)
end
let(:request) { Rack::Request.new(env) }
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/castle/headers/filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
'HTTP_X_FORWARDED_FOR' => '1.2.3.4',
'HTTP_USER_AGENT' => 'Mozilla 1234',
'TEST' => '1',
'REMOTE_ADDR' => '1.2.3.4'
'REMOTE_ADDR' => '1.2.3.4',
'HTTP_CONTENT_LENGTH' => '0'
)
result[:HTTP_OK] = 'OK'
result
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/castle/payload/prepare_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
'/',
'HTTP_USER_AGENT' => ua,
'HTTP_X_FORWARDED_FOR' => ip,
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh"
'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh",
'HTTP_CONTENT_LENGTH' => '0'
)
end
let(:request) { Rack::Request.new(env) }
Expand Down

0 comments on commit 6154471

Please sign in to comment.