summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-03-30 15:19:27 -0700
committerGitHub <noreply@github.com>2022-03-30 15:19:27 -0700
commit18d274a881ace4df130239bdc9952f8245e518d5 (patch)
tree751defb32086edef276154a66da92b69ce641361 /spec
parent7690c5a138ecdd755920b497cb1970179be3cefe (diff)
parenta8a688763cc6f1615dae8ee60c5ce96f8f0d3115 (diff)
downloadchef-18d274a881ace4df130239bdc9952f8245e518d5.tar.gz
Merge pull request #12724 from DecoyJoe/feature/add-rubygems_url-to-chef_client_config
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/resource/chef_client_config_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/chef_client_config_spec.rb b/spec/unit/resource/chef_client_config_spec.rb
index 7e6d7a5c5c..a7d1152e3d 100644
--- a/spec/unit/resource/chef_client_config_spec.rb
+++ b/spec/unit/resource/chef_client_config_spec.rb
@@ -134,4 +134,12 @@ describe Chef::Resource::ChefClientConfig do
expect(provider.format_handler([{ "class" => "Foo", "arguments" => ["'one'", "two", "three"] }])).to eql(["Foo.new('one',two,three)"])
end
end
+
+ describe "rubygems_url property" do
+ it "accepts nil, a single URL, or an array of URLs" do
+ expect { resource.rubygems_url(nil) }.not_to raise_error
+ expect { resource.rubygems_url("https://rubygems.internal.example.com") }.not_to raise_error
+ expect { resource.rubygems_url(["https://rubygems.east.example.com", "https://rubygems.west.example.com"]) }.not_to raise_error
+ end
+ end
end