Browse Source

Change the search string to a more complex one (#1431)

pull/1378/head
kosiakkatrina 2 years ago committed by GitHub
parent
commit
0ae75a27b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      spec/services/filter_service_spec.rb

4
spec/services/filter_service_spec.rb

@ -55,12 +55,12 @@ describe FilterService do
context "when filtering sales logs" do
let(:sales_log_list) do
logs = FactoryBot.create_list(:sales_log, 5)
searched_log = FactoryBot.create(:sales_log, purchid: "2")
searched_log = FactoryBot.create(:sales_log, purchid: "kzmgaiFNsx323")
SalesLog.where(id: [searched_log.id] + logs.map(&:id))
end
context "when given a purchid" do
let(:search_term) { "2" }
let(:search_term) { "kzmgaiFNsx323" }
it "filters the collection on search term" do
expect(described_class.filter_by_search(sales_log_list, search_term).count).to eq(1)

Loading…
Cancel
Save