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 disabledmaster
parent
34ff2f032d
commit
ce2d322f09
|
@ -11,7 +11,7 @@ my $triggers = LoadFile(share('triggers.yml'));
|
||||||
triggers any => @$triggers;
|
triggers any => @$triggers;
|
||||||
|
|
||||||
zci answer_type => 'helpline';
|
zci answer_type => 'helpline';
|
||||||
zci is_cached => 1;
|
zci is_cached => 0;
|
||||||
|
|
||||||
my $helplines = LoadFile(share('helplines.yml'));
|
my $helplines = LoadFile(share('helplines.yml'));
|
||||||
my %suicide_phrases = map { $_ => 1 } @$triggers;
|
my %suicide_phrases = map { $_ => 1 } @$triggers;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use DDG::Test::Location;
|
||||||
use DDG::Request;
|
use DDG::Request;
|
||||||
|
|
||||||
zci answer_type => 'helpline';
|
zci answer_type => 'helpline';
|
||||||
zci is_cached => 1;
|
zci is_cached => 0;
|
||||||
|
|
||||||
sub build_structured_answer{
|
sub build_structured_answer{
|
||||||
my ($result, $num, $country) = @_;
|
my ($result, $num, $country) = @_;
|
||||||
|
@ -104,12 +104,6 @@ ddg_goodie_test(
|
||||||
query_raw => 'suicide silence',
|
query_raw => 'suicide silence',
|
||||||
location => test_location('us'),
|
location => test_location('us'),
|
||||||
),
|
),
|
||||||
undef,
|
|
||||||
|
|
||||||
DDG::Request->new(
|
|
||||||
query_raw => 'suicide girls',
|
|
||||||
location => test_location('au'),
|
|
||||||
),
|
|
||||||
undef
|
undef
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue