Sha256: dd1238a95ed16ccec08f5a954a2589cd7ba58f022fe016a7192036f112f9544e
Contents?: true
Size: 1.11 KB
Versions: 3
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' module Sparrow describe Steward, type: :unit do let(:env) do { 'PATH_INFO' => '/api/state', 'rack.input' => 'teststring', 'CONTENT-TYPE' => 'application/json', 'ACCEPT' => 'application/json' } end let(:http_message) { RequestHttpMessage.new(env) } let(:excluded_routes) { ['/api/model/certificates'] } let(:allowed_accepts) { ['application/json'] } let(:allowed_content_types) { ['application/json'] } subject(:steward) do Steward.new(http_message, allowed_accepts: allowed_accepts, allowed_content_types: allowed_content_types, excluded_routes: excluded_routes) end it { is_expected.to have_processable_http_message } its(:http_message) { is_expected.to eq http_message } its(:route_parser) { is_expected.to be_present } its(:excluded_routes) { is_expected.to eq excluded_routes } its(:allowed_accepts) { is_expected.to eq allowed_accepts } its(:allowed_content_types) { is_expected.to eq allowed_content_types } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cp-sparrow-0.0.16 | spec/unit/steward_spec.rb |
cp-sparrow-0.0.15 | spec/unit/steward_spec.rb |
cp-sparrow-0.0.14 | spec/unit/steward_spec.rb |