PageRenderTime 0ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/t/IsItUp.t

https://github.com/robertbrook/zeroclickinfo-spice
Perl | 37 lines | 30 code | 4 blank | 3 comment | 0 complexity | 0438fb2d016fa61bd0d2ecbb2c70db1f MD5 | raw file
 1#!/usr/bin/env perl
 2
 3use strict;
 4use warnings;
 5use Test::More;
 6use DDG::Test::Spice;
 7use utf8;
 8
 9ddg_spice_test(
10    [qw( DDG::Spice::IsItUp )],
11    'is duckduckgo.com up?' => test_spice(
12        '/js/spice/is_it_up/duckduckgo.com',
13        call_type => 'include',
14        caller => 'DDG::Spice::IsItUp',
15    ),
16    'is http://duckduckgo.com up?' => test_spice(
17        '/js/spice/is_it_up/duckduckgo.com',
18        call_type => 'include',
19        caller => 'DDG::Spice::IsItUp',
20    ),
21    'is http://duckduckgo.com online?' => test_spice(
22        '/js/spice/is_it_up/duckduckgo.com',
23        call_type => 'include',
24        caller => 'DDG::Spice::IsItUp',
25    ),
26    # unfortunately, the isitup.com api does not
27    # currently support unicode or ssl
28    'is føtex.dk up?' => undef,
29    'is https://føtex.dk up?' => undef,
30    'is wolframalpha.com working?' => test_spice(
31        '/js/spice/is_it_up/wolframalpha.com',
32        caller    => 'DDG::Spice::IsItUp',
33    ),
34);
35
36done_testing;
37