Skip to content

Commit

Permalink
add a test for integers passed to the time filter
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLasseigne committed Jan 10, 2021
1 parent a9cd4b0 commit 61cb815
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/active_interaction/filters/time_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def to_str
end
end

context 'with an Integer' do
let(:value) { rand(1 << 16) }

it 'returns the Time' do
expect(result).to eql Time.at(value)
end
end

context 'with a GroupedInput' do
let(:year) { 2012 }
let(:month) { 1 }
Expand Down

0 comments on commit 61cb815

Please sign in to comment.