Skip to content

Commit

Permalink
remove present? calls
Browse files Browse the repository at this point in the history
Empty strings / data structures should be treated differently than nils.
We don't really need these calls here (don't pass in blank strings).
  • Loading branch information
tenderlove committed Jan 12, 2016
1 parent 04d6161 commit dd73144
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actionpack/lib/action_controller/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,24 +459,24 @@ def process(action, *args)
parameters = nil
end

if parameters.present? || session.present? || flash.present?
if parameters || session || flash
non_kwarg_request_warning
end
end

if body.present?
if body
@request.set_header 'RAW_POST_DATA', body
end

if http_method.present?
if http_method
http_method = http_method.to_s.upcase
else
http_method = "GET"
end

parameters ||= {}

if format.present?
if format
parameters[:format] = format
end

Expand Down

0 comments on commit dd73144

Please sign in to comment.