summaryrefslogtreecommitdiffstats
path: root/spec/unit/network
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-01-10 18:30:42 -0800
committerPaul Berry <paul@puppetlabs.com>2011-01-11 11:41:46 -0800
commita002231f45339da9b152162c2f48126d95e2e246 (patch)
treecf51e75f954847fda264b561a7a3acdfa5869dda /spec/unit/network
parente6e88e7df7fa1cbec1400d73cb7ba9428c420be0 (diff)
(#5171) Made filebucket able to perform diffs
It is now possible to ask the filebucket to diff two files using a URL of the form: https://puppet/production/file_bucket_file/md5/{first file hash}?diff_with={second file hash} The returned diff is a string, the output of the "diff" command. Paired-with: Paul Berry <paul@puppetlabs.com>
Diffstat (limited to 'spec/unit/network')
-rwxr-xr-xspec/unit/network/http/handler_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/network/http/handler_spec.rb b/spec/unit/network/http/handler_spec.rb
index 76a9c5530..cdbce41f7 100755
--- a/spec/unit/network/http/handler_spec.rb
+++ b/spec/unit/network/http/handler_spec.rb
@@ -209,6 +209,12 @@ describe Puppet::Network::HTTP::Handler do
@handler.do_find(@irequest, @request, @response)
end
+ it "should pass the result through without rendering it if the result is a string" do
+ @model_class.stubs(:find).returns "foo"
+ @handler.expects(:set_response).with(@response, "foo")
+ @handler.do_find(@irequest, @request, @response)
+ end
+
it "should use the default status when a model find call succeeds" do
@handler.expects(:set_response).with { |response, body, status| status.nil? }
@handler.do_find(@irequest, @request, @response)