Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ class ReportAggregationFilter < Base
attribute :localized_values,
on: :read,
type: :array

attribute :default_values,
on: :read,
type: :array

attribute :fixed_values,
on: :read,
type: :array
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
it { is_expected.to define_attribute(:localized_name).as(:string) }
it { is_expected.to define_attribute(:values).as(:array) }
it { is_expected.to define_attribute(:localized_values).as(:array) }
it { is_expected.to define_attribute(:default_values).as(:array) }
it { is_expected.to define_attribute(:fixed_values).as(:array) }

it 'casts filter metadata' do
expect(filter.name).to eq('operator_id')
expect(filter.localized_name).to eq('Operator')
expect(filter.values).to eq(%w[op-1 op-2])
expect(filter.localized_values).to eq(%w[Op-1 Op-2])
expect(filter.default_values).to be_nil
expect(filter.fixed_values).to be_nil
end

it 'accepts unrestricted filter values' do
Expand Down