Sha256: 653a45f9c6331b1dfb0526741cb283d50cecd66c3e6093b9877ae445ea77d32a

Contents?: true

Size: 506 Bytes

Versions: 8

Compression:

Stored size: 506 Bytes

Contents

RSpec.describe Rails::Auth::Credentials::InjectorMiddleware do
  let(:request)     { Rack::MockRequest.env_for("https://www.example.com") }
  let(:app)         { ->(env) { [200, env, "Hello, world!"] } }
  let(:middleware)  { described_class.new(app, credentials) }
  let(:credentials) { { "foo" => "bar" } }

  it "overrides rails-auth credentials in the rack environment" do
    _response, env = middleware.call(request)
    expect(env[Rails::Auth::Env::CREDENTIALS_ENV_KEY]).to eq credentials
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails-auth-2.1.4 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.1.3 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.1.2 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.1.1 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.1.0 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.0.3 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.0.2 spec/rails/auth/credentials/injector_middleware_spec.rb
rails-auth-2.0.1 spec/rails/auth/credentials/injector_middleware_spec.rb