Sha256: 03eb4579b2f4e5c757e8fc99e3196f1bb658ceb334f082686963139135bc9d6d
Contents?: true
Size: 774 Bytes
Versions: 2
Compression:
Stored size: 774 Bytes
Contents
require 'spec_helper' require 'goliath/validation/standard_http_errors' describe Goliath::Validation::Error do it 'defines exceptions for each standard error response' do expect { Goliath::Validation::BadRequestError.new }.not_to raise_error expect(Goliath::Validation::BadRequestError).to be < Goliath::Validation::Error end it 'defines InternalServerError not InternalServerErrorError' do expect { Goliath::Validation::InternalServerError.new }.not_to raise_error expect(Goliath::Validation::InternalServerError).to be < Goliath::Validation::Error end it 'sets a default status code and message' do nfe = Goliath::Validation::NotFoundError.new expect(nfe.status_code).to eq('404') expect(nfe.message).to eq('Not Found') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
goliath-1.0.7 | spec/unit/validation/standard_http_errors_spec.rb |
goliath-1.0.6 | spec/unit/validation/standard_http_errors_spec.rb |