From ce2d322f094c30a66e9e3d484a8f85f45f7da679 Mon Sep 17 00:00:00 2001 From: NaveenKarippai Date: Tue, 14 Jun 2016 19:47:53 +0000 Subject: [PATCH] HelpLine: Remove obsolete test cases and cache The cache should be disabled as users from different locations will get different results for the same query (basically location enabled IA should have cache disabled). The test cases should be cleaned by removing obsolete test cases from the suite. * obsolete test cases removed * cache disabled --- lib/DDG/Goodie/HelpLine.pm | 2 +- t/HelpLine.t | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/DDG/Goodie/HelpLine.pm b/lib/DDG/Goodie/HelpLine.pm index 2b58a731e..541aa507a 100755 --- a/lib/DDG/Goodie/HelpLine.pm +++ b/lib/DDG/Goodie/HelpLine.pm @@ -11,7 +11,7 @@ my $triggers = LoadFile(share('triggers.yml')); triggers any => @$triggers; zci answer_type => 'helpline'; -zci is_cached => 1; +zci is_cached => 0; my $helplines = LoadFile(share('helplines.yml')); my %suicide_phrases = map { $_ => 1 } @$triggers; diff --git a/t/HelpLine.t b/t/HelpLine.t index 3864b399f..1d8c51685 100755 --- a/t/HelpLine.t +++ b/t/HelpLine.t @@ -9,7 +9,7 @@ use DDG::Test::Location; use DDG::Request; zci answer_type => 'helpline'; -zci is_cached => 1; +zci is_cached => 0; sub build_structured_answer{ my ($result, $num, $country) = @_; @@ -104,12 +104,6 @@ ddg_goodie_test( query_raw => 'suicide silence', location => test_location('us'), ), - undef, - - DDG::Request->new( - query_raw => 'suicide girls', - location => test_location('au'), - ), undef );