Skip to content
This repository was archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1144 from duckduckgo/jag/ducksay-fix
Browse files Browse the repository at this point in the history
DuckSay: The IA has to return `call` if it's a type `self`.
  • Loading branch information
Jason committed Oct 8, 2014
2 parents 56f1477 + e30c553 commit 7974c08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/DDG/Spice/DuckSay.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ handle remainder => sub {
if ($_ ne '') {
# Skip calling reddit's API if text is given
spice call_type => 'self';
return call;
}
return $_;
};
Expand Down
4 changes: 2 additions & 2 deletions t/DuckSay.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ ddg_spice_test(
caller => 'DDG::Spice::DuckSay'
),
'ducksay hello world!' => test_spice(
'hello world!',
'/js/spice/duck_say/',
call_type => 'self',
is_unsafe => 1,
caller => 'DDG::Spice::DuckSay'
),
'daxsays hello world!' => test_spice(
'hello world!',
'/js/spice/duck_say/',
call_type => 'self',
is_unsafe => 1,
caller => 'DDG::Spice::DuckSay'
Expand Down

0 comments on commit 7974c08

Please sign in to comment.