diff options
author | Ilan Rabinovitch <ilan@ooyala.com> | 2013-11-28 10:45:40 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-12-20 10:06:45 -0800 |
commit | 543c6b4b00267d50cb044f34f50e0a8620de6cff (patch) | |
tree | 430443cfbd02a44dfb1b30afcb54557fa7ec2141 /spec/unit/data_bag_spec.rb | |
parent | d676779215aaa7b45675592942d4b4ea50b7e4f7 (diff) | |
download | chef-543c6b4b00267d50cb044f34f50e0a8620de6cff.tar.gz |
CHEF-3531: add tests for allowing dots in data bag names or ids
Diffstat (limited to 'spec/unit/data_bag_spec.rb')
-rw-r--r-- | spec/unit/data_bag_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb index 9fbdc64d98..8c9465caf7 100644 --- a/spec/unit/data_bag_spec.rb +++ b/spec/unit/data_bag_spec.rb @@ -47,6 +47,12 @@ describe Chef::DataBag do it "should throw an ArgumentError if you feed it anything but a string" do lambda { @data_bag.name Hash.new }.should raise_error(ArgumentError) end + + [ ".", "-", "_", "1"].each do |char| + it "should allow a '#{char}' character in the data bag name" do + @data_bag.name("clown#{char}clown").should == "clown#{char}clown" + end + end end describe "deserialize" do |