Browse Source

Test filter presence

pull/522/head
baarkerlounger 3 years ago
parent
commit
e7e82bef8f
  1. 18
      spec/requests/case_logs_controller_spec.rb

18
spec/requests/case_logs_controller_spec.rb

@ -351,6 +351,24 @@ RSpec.describe CaseLogsController, type: :request do
it "shows the download csv link" do it "shows the download csv link" do
expect(page).to have_link("Download (CSV)", href: "/logs.csv") expect(page).to have_link("Download (CSV)", href: "/logs.csv")
end end
it "does not show the organisation filter" do
expect(page).not_to have_field("organisation-field")
end
end
context "when the user is a customer support user" do
let(:user) { FactoryBot.create(:user, :support) }
before do
allow(user).to receive(:need_two_factor_authentication?).and_return(false)
sign_in user
get "/logs", headers:, params: {}
end
it "does show the organisation filter" do
expect(page).to have_field("organisation-field")
end
end end
context "when there are more than 20 logs" do context "when there are more than 20 logs" do

Loading…
Cancel
Save