Skip to content

Commit

Permalink
More thorough ids tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Jan 28, 2025
1 parent 507651d commit 7c15c8b
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions test/classes/query/names_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,29 @@ def test_name_by_rss_log
assert_query(expects, :Name, by: :rss_log)
end

def test_name_in_set
assert_query([names(:fungi).id,
names(:coprinus_comatus).id,
names(:conocybe_filaris).id,
names(:lepiota_rhacodes).id,
names(:lactarius_subalpinus).id],
:Name,
ids: [names(:fungi).id,
names(:coprinus_comatus).id,
names(:conocybe_filaris).id,
names(:lepiota_rhacodes).id,
names(:lactarius_subalpinus).id])
def names_set_for_ids
[
names(:fungi),
names(:coprinus_comatus),
names(:conocybe_filaris),
names(:lepiota_rhacodes),
names(:lactarius_subalpinus)
]
end

def test_name_ids_with_ids
assert_query(names_set_for_ids.map(&:id),
:Name, ids: names_set_for_ids.map(&:id))
end

def test_name_ids_with_instances
assert_query(names_set_for_ids.map(&:id),
:Name, ids: names_set_for_ids)
end

def test_name_ids_with_search_names
assert_query(names_set_for_ids.map(&:id),
:Name, ids: names_set_for_ids.map(&:search_name))
end

def test_name_by_user
Expand Down

0 comments on commit 7c15c8b

Please sign in to comment.