Method: Test::Unit::Assertions#assert_response

Defined in:
lib/og/test/assertions.rb

#assert_response(options = {}) ⇒ Object

Check the status of the response.



21
22
23
24
25
26
27
28
29
30
# File 'lib/og/test/assertions.rb', line 21

def assert_response(options = {})
  unless options.is_a? Hash
    options = { :status => options }
  end
  msg = options[:msg]
  if status = options.fetch(:status, :success)
    status = STATUS_MAP[status] if STATUS_MAP.has_key?(status)
    assert_status(status, msg)
  end
end