Browse Source

Added test for non matching logs

pull/608/head
Ted 3 years ago committed by JG
parent
commit
35df8c84b1
  1. 2
      spec/features/log_spec.rb
  2. 10
      spec/requests/case_logs_controller_spec.rb

2
spec/features/log_spec.rb

@ -32,7 +32,7 @@ RSpec.describe "Log Features" do
end
end
context "using log tenancy_code" do
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")

10
spec/requests/case_logs_controller_spec.rb

@ -192,7 +192,17 @@ RSpec.describe CaseLogsController, type: :request do
expect(page).to have_content(logs.first.id)
expect(page).not_to have_content(logs.last.id)
end
context "no match is found" do
it "shows case logs matching the search word" do
get "/logs?search-field=777", headers: headers, params: {}
logs.each do |log|
expect(page).not_to have_content(log.id)
end
end
end
end
context "when filtering" do
context "with status filter" do

Loading…
Cancel
Save