From e93ed809782a731831eb51ecd20f029065171703 Mon Sep 17 00:00:00 2001 From: JG Date: Wed, 25 May 2022 08:02:39 +0100 Subject: [PATCH] moving other ways of searching to the request specs --- spec/features/log_spec.rb | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/spec/features/log_spec.rb b/spec/features/log_spec.rb index e7f9b18b4..940ab7de8 100644 --- a/spec/features/log_spec.rb +++ b/spec/features/log_spec.rb @@ -22,24 +22,12 @@ RSpec.describe "Log Features" do expect(page).to have_button("Search") end - context "using log ID" do - it "it displays log matching the log ID" do - fill_in("search-field", with: log_to_search.id) - click_button("Search") - expect(page).to have_content(log_to_search.id) - expect(page).not_to have_content(same_organisation_log.id) - expect(page).not_to have_content(another_organisation_log.id) - end - end - - context "using log tenancy code" do - it "it displays log matching the tenancy code" do - fill_in("search-field", with: log_to_search.tenancy_code) - click_button("Search") - expect(page).to have_content(log_to_search.id) - expect(page).not_to have_content(same_organisation_log.id) - expect(page).not_to have_content(another_organisation_log.id) - end + it "it displays log matching the log ID" do + fill_in("search-field", with: log_to_search.id) + click_button("Search") + expect(page).to have_content(log_to_search.id) + expect(page).not_to have_content(same_organisation_log.id) + expect(page).not_to have_content(another_organisation_log.id) end end end