diff options
| author | Luke Kanies <luke@madstop.com> | 2008-08-20 23:37:13 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-08-20 23:45:29 -0500 |
| commit | 7034882fdfbd3846e77c518e43bdea1f9154e250 (patch) | |
| tree | c0ac8f53f60dfb4febea33bb37f9c4099a3d1322 /spec/unit/network/http/mongrel | |
| parent | 66c40b374d7315d11575d701ce195ce656abbeb7 (diff) | |
| download | puppet-7034882fdfbd3846e77c518e43bdea1f9154e250.tar.gz puppet-7034882fdfbd3846e77c518e43bdea1f9154e250.tar.xz puppet-7034882fdfbd3846e77c518e43bdea1f9154e250.zip | |
Adding parameter and URL support to the REST terminus.
Previously, the server side correctly pulled parameters out of
the query strings, but the REST terminus never passed them on. It does
now, at least for finding and searching. It appears that at least
WEBrick doesn't support parameters for anything other than forms
and GET.
I've also added the ability for the REST terminus to pull
host/port information from the request key, if it's a URI.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/network/http/mongrel')
| -rwxr-xr-x | spec/unit/network/http/mongrel/rest.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/network/http/mongrel/rest.rb b/spec/unit/network/http/mongrel/rest.rb index 0d4ce36bd..3b248dcfe 100755 --- a/spec/unit/network/http/mongrel/rest.rb +++ b/spec/unit/network/http/mongrel/rest.rb @@ -58,6 +58,11 @@ describe "Puppet::Network::HTTP::MongrelREST" do @handler.request_key(@request).should == "bar" end + it "should return nil as the request key if no second field is present" do + @params.expects(:[]).with(Mongrel::Const::REQUEST_PATH).returns "/foo" + @handler.request_key(@request).should be_nil + end + it "should return the request body as the body" do @request.expects(:body).returns "mybody" @handler.body(@request).should == "mybody" |
