From 0ae75a27b9078f26937dd92b1bbcc25fc3655d12 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 17 Mar 2023 10:23:06 +0000 Subject: [PATCH] Change the search string to a more complex one (#1431) --- spec/services/filter_service_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/services/filter_service_spec.rb b/spec/services/filter_service_spec.rb index 6122550c9..e1d4652a7 100644 --- a/spec/services/filter_service_spec.rb +++ b/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)