summaryrefslogtreecommitdiff
path: root/spec/unit/cookbook_uploader_spec.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-06 09:43:09 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-11 10:52:49 -0800
commit6c9f246b04c23906dd5297d178a423c96bc7b369 (patch)
treeb12595c7931c0c9a8d9962ec9e6469f7483998aa /spec/unit/cookbook_uploader_spec.rb
parent677ca0d7e3366ea9b3b6a912c8c6c28d543e2046 (diff)
downloadchef-6c9f246b04c23906dd5297d178a423c96bc7b369.tar.gz
Temporarily implement deprecation warnings as errors
This is an intermediate step where we're cleaning up all internal code to convert cookbook version objects to JSON in the new way.
Diffstat (limited to 'spec/unit/cookbook_uploader_spec.rb')
-rw-r--r--spec/unit/cookbook_uploader_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/cookbook_uploader_spec.rb b/spec/unit/cookbook_uploader_spec.rb
index dc9ca5f1a6..deb0536487 100644
--- a/spec/unit/cookbook_uploader_spec.rb
+++ b/spec/unit/cookbook_uploader_spec.rb
@@ -94,6 +94,10 @@ describe Chef::CookbookUploader do
end
end
+ def expected_save_url(cookbook)
+ "cookbooks/#{cookbook.name}/#{cookbook.version}"
+ end
+
def expect_sandbox_commit
expect(http_client).to receive(:put).with(sandbox_commit_uri, {:is_completed => true})
end
@@ -102,7 +106,7 @@ describe Chef::CookbookUploader do
cookbooks_to_upload.each do |cookbook|
expect(http_client).to receive(:put).
- with(cookbook.save_url, cookbook)
+ with(expected_save_url(cookbook), cookbook)
end
end