Skip to content

Commit

Permalink
one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifnada committed Jan 27, 2025
1 parent 8c9b8e6 commit eaec59a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/ransack/adapters/active_record/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ module ActiveRecord
expect { Person.ransack('') }.to_not raise_error
end

it 'raises ArgumentError exception if ransack! called with unknown condition' do
expect { Person.ransack!(unknown_attr_eq: 'Ernie') }.to raise_error(ArgumentError)
end

it 'raises InvalidSearchError exception if ransack! called with unknown condition' do
expect { Person.ransack!(unknown_attr_eq: 'Ernie') }.to raise_error(InvalidSearchError)
end
Expand Down

0 comments on commit eaec59a

Please sign in to comment.