Skip to content

Commit

Permalink
add test for wild characters in method names
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed Jul 26, 2024
1 parent ac8aad8 commit 0800d7a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/models/miq_ae_method_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@
expect(MiqAeMethod.name_path_search("match")).to eq([m1])
end

it "matches a name with a %" do
m1 = FactoryBot.create(:miq_ae_method, "name" => "10_is_bigger", :class_id => sub_class.id)
FactoryBot.create(:miq_ae_method, "name" => "nope", :class_id => sys_class.id)

expect(MiqAeMethod.name_path_search("10%_big")).to eq([m1])
end

it "matches path" do
m1 = FactoryBot.create(:miq_ae_method, "name" => "match", :class_id => sub_class.id)
FactoryBot.create(:miq_ae_method, "name" => "nope", :class_id => sys_class.id)
Expand Down

0 comments on commit 0800d7a

Please sign in to comment.