Sha256: c5c99f557f2b4661f95f37358912d9abaabd26e1c71ff01f676883d4e6543b8c
Contents?: true
Size: 787 Bytes
Versions: 160
Compression:
Stored size: 787 Bytes
Contents
module ForestLiana class PieStatGetterTest < ActiveSupport::TestCase test 'Pie stat getter with an aggregate on a boolean field' do stat = PieStatGetter.new(BooleanField, { type: "Pie", collection: "boolean_field", timezone: "Europe/Paris", aggregate: "Count", group_by_field: "field" }) stat.perform assert stat.record.value.count == 0 end test 'Pie stat getter with an aggregate on a foreign key' do stat = PieStatGetter.new(BelongsToField, { type: "Pie", collection: "belongs_to_field", timezone: "Europe/Paris", aggregate: "Count", group_by_field: "has_one_field_id" }) stat.perform assert stat.record.value.count == 30 end end end
Version data entries
160 entries across 160 versions & 1 rubygems