Use normalizes
on CustomFilter#context
value (#27602)
This commit is contained in:
parent
71eecbfa1f
commit
01b624c4a0
2 changed files with 9 additions and 5 deletions
|
@ -32,4 +32,12 @@ RSpec.describe CustomFilter do
|
|||
expect(record).to model_have_error_on_field(:context)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'Normalizations' do
|
||||
it 'cleans up context values' do
|
||||
record = described_class.new(context: ['home', 'notifications', 'public ', ''])
|
||||
|
||||
expect(record.context).to eq(%w(home notifications public))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue