Sha256: 15ac52433368c6e58ed5ec0f37e316f07530b749f20e4bdd33489f90cf89bfa3

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require './test/test_helper'

class VirustotalAPIIPReportTest < Minitest::Test
  def setup
    @ip      = '8.8.8.8'
    @api_key = 'testapikey'
  end

  def test_class_exists
    assert VirustotalAPI::IP
  end

  def test_report_response
    VCR.use_cassette('ip') do
      vtip_report = VirustotalAPI::IP.find(@ip, @api_key)

      # Make sure that the JSON was parsed
      assert vtip_report.is_a?(VirustotalAPI::IP)
      assert vtip_report.report.is_a?(Hash)
      assert vtip_report.id.is_a?(String)
      assert vtip_report.report_url.is_a?(String)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
virustotal_api_compat-0.1.7 test/ip_test.rb