Created
April 15, 2016 01:52
-
-
Save zoffixznet/7ecb36ac26c1b7a371ab7e200f1a94c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subtest { | |
my $res = $glot.create: 'perl6', 'say "Hello, World!"'; | |
is $res.WHAT, Hash, 'returns a Hash'; | |
diag "Created paste ID $res<id>"; | |
is-deeply $res, $glot.get($res<id>), '.get fetches the snippet fine'; | |
isa-ok $glot.delete: $res<id>, True, | |
'successful .delete returns True'; | |
throws-like { $glot.delete: $res<id> }, Exception, | |
'delete on non-existent snippet throws', | |
message => /404/; | |
}, '.create method (Str for code)'; | |
t/02-snippets-api.t .. | |
ok 1 - returns a Hash | |
# Created paste ID edrph6mqvi | |
ok 2 - .get fetches the snippet fine | |
Too many positionals passed; expected 2 arguments but got 4 | |
in method delete at /home/zoffix/CPAN/GlotIO/lib/GlotIO.pm6 (GlotIO) line 168 | |
in block <unit> at t/02-snippets-api.t line 182 | |
Dubious, test returned 1 (wstat 256, 0x100) | |
No subtests run | |
Test Summary Report | |
------------------- | |
t/02-snippets-api.t (Wstat: 256 Tests: 0 Failed: 0) | |
Non-zero exit status: 1 | |
Parse errors: No plan found in TAP output | |
Files=1, Tests=0, 6 wallclock secs ( 0.08 usr 0.01 sys + 3.43 cusr 0.23 csys = 3.75 CPU) | |
Result: FAIL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment