# 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 :benchmarks

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

end
