diff options
author | Thom May <thom@chef.io> | 2015-12-02 12:19:33 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-11 15:40:42 +0000 |
commit | d99e306a41b1402209d320cb7119b12a3bbb962f (patch) | |
tree | f65940702826deb991e6198967d3e9e96cb2857a /spec/unit/knife/data_bag_edit_spec.rb | |
parent | 1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff) | |
download | chef-d99e306a41b1402209d320cb7119b12a3bbb962f.tar.gz |
Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_rest
In the process, stop auto-expanding JSON in the HTTP client, and let
individual classes control that themselves.
Fixes #2737, Fixes #3518
Diffstat (limited to 'spec/unit/knife/data_bag_edit_spec.rb')
-rw-r--r-- | spec/unit/knife/data_bag_edit_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/data_bag_edit_spec.rb b/spec/unit/knife/data_bag_edit_spec.rb index 6f19b5e63e..f1bcae990b 100644 --- a/spec/unit/knife/data_bag_edit_spec.rb +++ b/spec/unit/knife/data_bag_edit_spec.rb @@ -37,7 +37,7 @@ describe Chef::Knife::DataBagEdit do let(:db) { Chef::DataBagItem.from_hash(raw_hash)} let(:raw_edited_hash) { {"login_name" => "rho", "id" => "item_name", "new_key" => "new_value"} } - let(:rest) { double("Chef::REST") } + let(:rest) { double("Chef::ServerAPI") } let(:stdout) { StringIO.new } let(:bag_name) { "sudoing_admins" } @@ -56,7 +56,7 @@ describe Chef::Knife::DataBagEdit do expect(Chef::DataBagItem).to receive(:load).with(bag_name, item_name).and_return(db) expect(knife).to receive(:encrypted?).with(db.raw_data).and_return(is_encrypted?) expect(knife).to receive(:edit_data).with(data_to_edit).and_return(raw_edited_hash) - expect(rest).to receive(:put_rest).with("data/#{bag_name}/#{item_name}", transmitted_hash).ordered + expect(rest).to receive(:put).with("data/#{bag_name}/#{item_name}", transmitted_hash).ordered knife.run end |