diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-11-11 10:40:30 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-11-22 10:51:35 +0900 |
commit | 31a71048521224774bdb8b5982ab73eb35dad66d (patch) | |
tree | 8174af2f04f4b31abf0f4ab08d779055f513cdaa /spec/bundler/bundler/env_spec.rb | |
parent | 6d540c1b9844a5832846618b53ce35d12d64deac (diff) |
Merge RubyGems 3.2.27 and Bundler 2.2.27
Diffstat (limited to 'spec/bundler/bundler/env_spec.rb')
-rw-r--r-- | spec/bundler/bundler/env_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/bundler/env_spec.rb b/spec/bundler/bundler/env_spec.rb index 513c42ac09..8cd59311b2 100644 --- a/spec/bundler/bundler/env_spec.rb +++ b/spec/bundler/bundler/env_spec.rb @@ -126,6 +126,20 @@ RSpec.describe Bundler::Env do end end + context "when there's bundler config with OAuth token credentials" do + before do + bundle "config set https://localgemserver.test/ api_token:x-oauth-basic" + end + + let(:output) { described_class.report(:print_gemfile => true) } + + it "prints the config with redacted values" do + expect(output).to include("https://localgemserver.test") + expect(output).to include("[REDACTED]:x-oauth-basic") + expect(output).to_not include("api_token:x-oauth-basic") + end + end + context "when Gemfile contains a gemspec and print_gemspecs is true" do let(:gemspec) do strip_whitespace(<<-GEMSPEC) |