summaryrefslogtreecommitdiff
path: root/chef-config/spec/unit/config_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config/spec/unit/config_spec.rb')
-rw-r--r--chef-config/spec/unit/config_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index 8e9a499a1a..4af5d4b7c7 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -60,6 +60,12 @@ RSpec.describe ChefConfig::Config do
expect(ChefConfig::Config.chef_server_url).to eq("https://junglist.gen.nz")
end
end
+
+ context "when the url is invalid" do
+ it "raises an exception" do
+ expect { ChefConfig::Config.chef_server_url = "127.0.0.1" }.to raise_error(ChefConfig::ConfigurationError)
+ end
+ end
end
describe "when configuring formatters" do