lib/tester/modules/typo.rb in api-tester-0.0.3 vs lib/tester/modules/typo.rb in api-tester-0.0.4
- old
+ new
@@ -20,22 +20,23 @@
def check_verbs definition, url, verbs
missing_verbs = SupportedVerbs.all - verbs
missing_verbs.each do |verb|
check_method = create_api_method verb
typo_case = BoundaryCase.new("Typo verb check #{verb}", {}, {})
- response = self.call check_method, definition.url, typo_case
+ response = self.call check_method, definition, typo_case
test = TypoClass.new response, typo_case.payload, definition.not_allowed_response, url, verb
reports = test.check
self.report.reports.concat reports
end
end
def check_typo_url definition, url
bad_url = "#{url}gibberishadsfasdf"
+ bad_definition = Endpoint.new "Bad URL", bad_url
typo_case = BoundaryCase.new("Typo URL check", {}, {})
check_method = create_api_method SupportedVerbs::GET
- response = self.call check_method, bad_url, typo_case
+ response = self.call check_method, bad_definition, typo_case
test = TypoClass.new response, typo_case.payload, definition.not_found_response, bad_url, SupportedVerbs::GET
reports = test.check
self.report.reports.concat reports
end