diff options
author | Sarah Michaelson <sarah.michaelson@gmail.com> | 2015-09-16 07:14:23 -0400 |
---|---|---|
committer | Bryan McLellan <btm@chef.io> | 2015-11-25 12:42:36 -0500 |
commit | 8766e9395c3dd3f7e5b8e458d69352a9b8179bdd (patch) | |
tree | 38b35c5c167dce833c81b03e8a389af0d0f0b707 /chef-config/spec | |
parent | 199ec5d16985b6717e0a3b23594ca90c4c50e9c3 (diff) | |
download | chef-8766e9395c3dd3f7e5b8e458d69352a9b8179bdd.tar.gz |
GH-1909 Add validation for chef_server_url
Diffstat (limited to 'chef-config/spec')
-rw-r--r-- | chef-config/spec/unit/config_spec.rb | 6 |
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 |