From 192a31f95cb40aebd8100039295fd748407080f0 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Tue, 3 Jan 2012 13:37:23 +0100 Subject: fix assert-rest-call-error method --- validation.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/validation.rb b/validation.rb index 849cbf6..b608d40 100644 --- a/validation.rb +++ b/validation.rb @@ -188,7 +188,7 @@ class ValidationTest < Test::Unit::TestCase end end report = OpenTox::ValidationReport.find_for_validation(v.uri,@@subjectid) - assert report==nil,"report already exists for validation\nreport: "+(report ? report.uri.to_s : "")+"\nvalidation: "+v.uri.to_s + assert_nil report,"report already exists for validation\nreport: "+(report ? report.uri.to_s : "")+"\nvalidation: "+v.uri.to_s params = {:min_confidence => 0.05} report = OpenTox::ValidationReport.create(v.uri,params,@@subjectid) assert report.uri.uri? @@ -425,6 +425,7 @@ class ValidationTest < Test::Unit::TestCase end begin yield + assert false,"no rest-call error thrown" rescue OpenTox::RestCallError => e raise "error Report of RestCallError is no errorReport: "+e.errorCause.class.to_s+":\n"+e.errorCause.to_yaml unless e.errorCause.is_a?(OpenTox::ErrorReport) report = e.errorCause -- cgit v1.2.3