Sha256: ce556168a62cea960ddc8406b9b58f6e6f0ad1b1e3ea9c911fd55386f14d0f71
Contents?: true
Size: 535 Bytes
Versions: 28
Compression:
Stored size: 535 Bytes
Contents
require 'spec_helper' require 'ostruct' describe 'Intercom::Request' do it 'raises an error when a html error page rendered' do response = OpenStruct.new(:code => 500) req = Intercom::Request.new('path/', 'GET') proc {req.parse_body('<html>somethjing</html>', response)}.must_raise(Intercom::ServerError) end it 'parse_body returns nil if decoded_body is nil' do response = OpenStruct.new(:code => 500) req = Intercom::Request.new('path/', 'GET') req.parse_body(nil, response).must_equal(nil) end end
Version data entries
28 entries across 28 versions & 2 rubygems