Sha256: 71c381bec0833e5af6ea587eb790dc1ebf37d5dd80316526cc549a6be9fd3082
Contents?: true
Size: 375 Bytes
Versions: 1
Compression:
Stored size: 375 Bytes
Contents
require 'spec_helper' require 'napa/json_error' describe Napa::JsonError do context '#to_json' do it 'returns a json hash with the error data' do error = Napa::JsonError.new(:code, 'message').to_json parsed = JSON.parse(error) expect(parsed['error']['code']).to eq('code') expect(parsed['error']['message']).to eq('message') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
napa-0.4.0 | spec/json_error_spec.rb |