fix rubocop

This commit is contained in:
Dung Bui
2023-12-03 14:28:50 +07:00
parent 600226cb52
commit 6206164c30
2 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ module Spree
self.belongs_to_required_by_default = false
searchable_attributes :firstname, :lastname, :phone, :full_name, :full_name_with_comma,
:full_name_reversed
:full_name_reversed
searchable_associations :country, :state
belongs_to :country, class_name: "Spree::Country"

View File

@@ -242,24 +242,24 @@ describe '
end
it "by customer fullname with comma" do
fill_in "quick_filter", with: o1.bill_address.firstname + ', ' + o1.bill_address.lastname
fill_in "quick_filter", with: "#{o1.bill_address.firstname}, #{o1.bill_address.lastname}"
page.find('.filter-actions .button.icon-search').click
expect_line_items_results [li1], [li2, li3]
fill_in "quick_filter", with: o2.bill_address.firstname + ', ' + o2.bill_address.lastname
fill_in "quick_filter", with: "#{o2.bill_address.firstname}, #{o2.bill_address.lastname}"
page.find('.filter-actions .button.icon-search').click
expect_line_items_results [li2, li3], [li1]
end
it "by customer fullname reversed" do
fill_in "quick_filter", with: o1.bill_address.lastname + ' ' + o1.bill_address.firstname
fill_in "quick_filter", with: "#{o1.bill_address.lastname} #{o1.bill_address.firstname}"
page.find('.filter-actions .button.icon-search').click
expect_line_items_results [li1], [li2, li3]
fill_in "quick_filter", with: o2.bill_address.lastname + ' ' + o2.bill_address.firstname
fill_in "quick_filter", with: "#{o2.bill_address.lastname} #{o2.bill_address.firstname}"
page.find('.filter-actions .button.icon-search').click
expect_line_items_results [li2, li3], [li1]