Module: LeapWebCore::AssertResponses
- Included in:
- ActionController::TestCase, ActionDispatch::IntegrationTest
- Defined in:
- lib/extensions/testing.rb
Instance Method Summary collapse
Instance Method Details
#assert_attachement_filename(name) ⇒ Object
4 5 6 7 |
# File 'lib/extensions/testing.rb', line 4 def assert_attachement_filename(name) assert_equal %Q(attachment; filename="#{name}"), @response.headers["Content-Disposition"] end |
#assert_json_response(object) ⇒ Object
10 11 12 13 |
# File 'lib/extensions/testing.rb', line 10 def assert_json_response(object) object.stringify_keys! if object.respond_to? :stringify_keys! assert_equal object, JSON.parse(@response.body) end |