diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-08 09:38:43 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-08 09:38:59 +0000 |
commit | a5f6dc2d8af9a12c05c1b6e3897292f2eaee3ab0 (patch) | |
tree | cad5980fa17bcaf43502373e929d63b584b1d20e /spec/spec_helper.rb | |
parent | ee33ae705f3af6989931982c8d2ac57344a07e28 (diff) |
Don't give error when viewing HTML versions. Fixes issue #321
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 29ce6bca5..9bf752c99 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -138,10 +138,10 @@ if $tempfilecount.nil? def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET') self.original_process(action, parameters, session, flash, http_method) - + # don't validate auto-generated HTML + return if @request.query_parameters["action"] == "get_attachment_as_html" # XXX Is there a better way to check this than calling a private method? return unless @response.template.controller.instance_eval { integrate_views? } - # And then if HTML, not a redirect (302, 301) if @response.content_type == "text/html" && ! [301,302,401].include?(@response.response_code) validate_html(@response.body) |