summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-06-21 10:51:13 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-06-21 10:51:13 -0700
commit852cc5287765a350d09122e044c94a8c616f4116 (patch)
tree16299f8a3ce395f7b28b9c8b7bbb098026272d96 /spec
parent14322805574a96ace59d65c2a997b5042b836d4a (diff)
downloadchef-852cc5287765a350d09122e044c94a8c616f4116.tar.gz
Revert "Fixed Validation failed while creating databag and databag item"
This reverts commit 19f127b7ff177bed0a0ebdfd2e0720f6acfc6bd2.
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/data_bag_item_spec.rb4
-rw-r--r--spec/unit/data_bag_spec.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/data_bag_item_spec.rb b/spec/unit/data_bag_item_spec.rb
index 2487bd25d7..61e0a80444 100644
--- a/spec/unit/data_bag_item_spec.rb
+++ b/spec/unit/data_bag_item_spec.rb
@@ -73,11 +73,11 @@ describe Chef::DataBagItem do
end
it "should accept alphanum.alphanum for the id" do
- expect { data_bag_item.raw_data = { "id" => "foo.bar" } }.to raise_error(ArgumentError)
+ expect { data_bag_item.raw_data = { "id" => "foo.bar" } }.not_to raise_error
end
it "should accept .alphanum for the id" do
- expect { data_bag_item.raw_data = { "id" => ".bozo" } }.to raise_error(ArgumentError)
+ expect { data_bag_item.raw_data = { "id" => ".bozo" } }.not_to raise_error
end
it "should raise an exception if the id contains anything but alphanum/-/_" do
diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb
index 891f9c6616..2a7ddddd5b 100644
--- a/spec/unit/data_bag_spec.rb
+++ b/spec/unit/data_bag_spec.rb
@@ -49,7 +49,7 @@ describe Chef::DataBag do
expect { @data_bag.name({}) }.to raise_error(ArgumentError)
end
- ["-", "_", "1"].each do |char|
+ [ ".", "-", "_", "1"].each do |char|
it "should allow a '#{char}' character in the data bag name" do
expect(@data_bag.name("clown#{char}clown")).to eq("clown#{char}clown")
end