# frozen_string_literal: true

# Test - database model for hardware tests
class Test < Sequel::Model

  one_to_many :result
  many_to_one :hardware
  many_to_many :benchmark_profiles

  def benchmark?(benchmark_id)
    return benchmark_profiles_dataset.where(Sequel[:benchmark_profiles][:id] => benchmark_id).any?
  end

end
