fix: Scope auth to swagger endpoints

This commit is contained in:
Austin Kabiru
2018-12-03 11:02:57 +03:00
parent 875bbfa04b
commit 529cfae73e
4 changed files with 124 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
require 'spec_helper'
require 'rswag/ui/configuration'
require_relative '../../spec_helper'
RSpec.describe Rswag::Ui::Configuration do
describe '#swagger_endpoints'
@@ -40,7 +42,7 @@ RSpec.describe Rswag::Ui::Configuration do
it 'sets the username and password' do
configuration = described_class.new
configuration.basic_auth_credentials 'foo', 'bar'
credentials = configuration.config_object[:basic_aut]
credentials = configuration.config_object[:basic_auth]
expect(credentials).to eq(username: 'foo', password: 'bar')
end