Sha256: 6317ff17810d1d3c120413000a9fcb8d83d3a68bdb31c855a3d105be8d625db0

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

require 'tester/reporter/missing_response_field_report'
require 'tester/modules/module'

class UnusedFields < Module
  def go definition, report
    super

    definition.methods.each do |method|
      method.expected_response.body.each do |field|
        if field.is_seen == 0
          report.add_new_report MissingResponseFieldReport.new(definition.url, method.verb, field.name, "UnusedFieldsModule")
        end
      end
    end

    report.reports == []
  end

  def order
    99
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
api-tester-0.1.0 lib/tester/modules/unused_fields.rb
api-tester-0.0.5 lib/tester/modules/unused_fields.rb
api-tester-0.0.4 lib/tester/modules/unused_fields.rb
api-tester-0.0.3 lib/tester/modules/unused_fields.rb