summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrajaktaPurohit <prajakta@opscode.com>2012-12-11 18:45:18 -0800
committerLamont Granquist <lamont@opscode.com>2012-12-19 15:56:13 -0800
commit217cf85876651185b33fb574de7256e5a499d499 (patch)
tree8ba0f7a4d3addb24a38c160759731776e786120f
parent4bd6fb95f37f94402a8a5200e2018f36df5ca146 (diff)
downloadchef-217cf85876651185b33fb574de7256e5a499d499.tar.gz
Fixing tests as per changed code
-rw-r--r--spec/functional/resource/registry_spec.rb4
-rw-r--r--spec/functional/win32/registry_helper_spec.rb16
2 files changed, 2 insertions, 18 deletions
diff --git a/spec/functional/resource/registry_spec.rb b/spec/functional/resource/registry_spec.rb
index 668afb356d..2ef359273d 100644
--- a/spec/functional/resource/registry_spec.rb
+++ b/spec/functional/resource/registry_spec.rb
@@ -252,7 +252,7 @@ describe Chef::Resource::RegistryKey, :windows_only do
@report["resources"][0]["id"].should == reg_child + '\Ood'
@report["resources"][0]["after"][:values].should == [{:name=>"ReportingVal1", :type=>:string, :data=>"report1"},
{:name=>"ReportingVal2", :type=>:string, :data=>"report2"}]
- @report["resources"][0]["before"][:values].should == nil
+ @report["resources"][0]["before"][:values].should == []
@report["resources"][0]["result"].should == "create"
@report["status"].should == "success"
@report["total_res_count"].should == "1"
@@ -366,7 +366,7 @@ describe Chef::Resource::RegistryKey, :windows_only do
@report["resources"][0]["name"].should == resource_name
@report["resources"][0]["id"].should == reg_child + '\Judoon'
@report["resources"][0]["after"][:values].should == [{:name=>"ReportingVal3", :type=>:string, :data=>"report3"}]
- @report["resources"][0]["before"][:values].should == nil
+ @report["resources"][0]["before"][:values].should == []
@report["resources"][0]["result"].should == "create_if_missing"
@report["status"].should == "success"
@report["total_res_count"].should == "1"
diff --git a/spec/functional/win32/registry_helper_spec.rb b/spec/functional/win32/registry_helper_spec.rb
index bbd53bf8e4..830d6f4777 100644
--- a/spec/functional/win32/registry_helper_spec.rb
+++ b/spec/functional/win32/registry_helper_spec.rb
@@ -627,22 +627,6 @@ describe 'Chef::Win32::Registry', :windows_only do
end
end
- describe "create_value" do
- it "can create a 32-bit only registry value" do
- @registry.architecture = :i386
- @registry.create_value("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"}).should == true
- @registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"}).should == true
- @registry.architecture = :x86_64
- lambda{@registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"})}.should raise_error(Chef::Exceptions::Win32RegKeyMissing)
- end
- it "can create a 64-bit only registry value" do
- @registry.architecture = :x86_64
- @registry.create_value("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"}).should == true
- @registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"}).should == true
- @registry.architecture = :i386
- lambda{@registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"})}.should raise_error(Chef::Exceptions::Win32RegKeyMissing)
- end
- end
end
end
end