diff options
| -rw-r--r-- | lib/Net/HTTP/Spore/Meta/Method.pm | 1 | ||||
| -rw-r--r-- | t/spore-method/base.t | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore/Meta/Method.pm b/lib/Net/HTTP/Spore/Meta/Method.pm index 50e9f92..cc48230 100644 --- a/lib/Net/HTTP/Spore/Meta/Method.pm +++ b/lib/Net/HTTP/Spore/Meta/Method.pm @@ -29,6 +29,7 @@ has authentication => ( isa => Boolean, predicate => 'has_authentication', default => 0, + lazy => 1, coerce => 1, ); has base_url => ( diff --git a/t/spore-method/base.t b/t/spore-method/base.t index 1ea5018..61d8608 100644 --- a/t/spore-method/base.t +++ b/t/spore-method/base.t @@ -36,4 +36,6 @@ ok $method = Net::HTTP::Spore::Meta::Method->wrap( required => [qw/name id/], ); +ok !$method->has_authentication, 'authentication not set on method'; + done_testing; |
