diff options
author | Luke Kanies <luke@madstop.com> | 2009-02-18 17:00:27 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-19 17:51:21 -0600 |
commit | bd8d09747fd6c0dce89c17da41eb67ad92823cf7 (patch) | |
tree | 52c125acfcc5501c9282010d6ebcbe9ee8880eab /spec/unit | |
parent | d3bc1e8279b6e1d372ab3624982788cde026461d (diff) | |
download | puppet-bd8d09747fd6c0dce89c17da41eb67ad92823cf7.tar.gz puppet-bd8d09747fd6c0dce89c17da41eb67ad92823cf7.tar.xz puppet-bd8d09747fd6c0dce89c17da41eb67ad92823cf7.zip |
Providing better indirection authorization errors
The errors now include the indirection and key,
or the full URI used.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/indirector/request.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/indirector/request.rb b/spec/unit/indirector/request.rb index 12e196f77..dc1e4e39d 100755 --- a/spec/unit/indirector/request.rb +++ b/spec/unit/indirector/request.rb @@ -163,4 +163,12 @@ describe Puppet::Indirector::Request do it "should not be considered plural if the method is not 'search'" do Puppet::Indirector::Request.new(:myind, :find, :key).should_not be_plural end + + it "should use its uri, if it has one, as its string representation" do + Puppet::Indirector::Request.new(:myind, :find, "foo://bar/baz").to_s.should == "foo://bar/baz" + end + + it "should use its indirection name and key, if it has no uri, as its string representation" do + Puppet::Indirector::Request.new(:myind, :find, "key") == "/myind/key" + end end |