discourse-data-explorer/spec/fabricators/query_fabricator.rb

14 lines
362 B
Ruby

# frozen_string_literal: true
Fabricator(:query, from: DiscourseDataExplorer::Query) do
name { sequence(:name) { |i| "cat#{i}" } }
description { sequence(:desc) { |i| "description #{i}" } }
sql { sequence(:sql) { |i| "SELECT * FROM users limit #{i}" } }
user
end
Fabricator(:query_group, from: DiscourseDataExplorer::QueryGroup) do
query
group
end