diff options
| author | Steve Kemp <steve@steve.org.uk> | 2013-10-15 14:52:44 +0100 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2013-10-15 14:52:44 +0100 | 
| commit | e632236912029d2bbc2e5216a29eaf44aa4ffc88 (patch) | |
| tree | 6e05b56a82a782e42993d3da104929978383d507 /t | |
| parent | a4705b80e24c0e6dffa6079c8a944e3311ee796a (diff) | |
  We now allow "with cache busting", and "without cache busting".
Diffstat (limited to 't')
| -rwxr-xr-x | t/test-custodian-parser.rb | 37 | 
1 files changed, 37 insertions, 0 deletions
| diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb index 9dadeeb..400193c 100755 --- a/t/test-custodian-parser.rb +++ b/t/test-custodian-parser.rb @@ -314,6 +314,43 @@ EOF    # +  # Test that the parser works for cache-busting. +  # +  def test_http_cache_busting + +    # +    # test data +    # +    data = { +      "http://example must run http."                         => true, +      "http://example must run http with status 200."         => true, +      "http://example must run http with content 'bar'."      => true, +      "http://example must run http without cache busting."   => false, +    } + +    data.each do |str,cb| +      assert_nothing_raised do + +        # +        # Create the new parser +        # +        obj = Custodian::TestFactory.create( str ) + +        assert(obj) + +        if ( cb ) +          assert( obj.cache_busting? ) +        else +          assert( ! obj.cache_busting? ) +        end +      end +    end +  end + + + + +  #    # Test that the text we're going to use in alerters is present.    #    def test_alert_text | 
