Allow empty status option for feedback messages (#7739)

This commit is contained in:
Jacob Herrington 2020-05-08 09:17:24 -05:00 committed by GitHub
parent 81c9b27a7f
commit 911de37bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -17,11 +17,11 @@
<%= f.search_field :reporter_username_cont, placeholder: "Reporter", class: "form-control mx-3" %>
<%= f.select(
:status_eq,
options_for_select([["Open"], ["Invalid"], ["Resolved"]], @q.status_eq),
{},
class: "custom-select mx-3",
) %>
:status_eq,
options_for_select(["Open", "Invalid", "Resolved"], @q.status_eq),
{ include_blank: true },
class: "custom-select mx-3",
) %>
<%= f.submit "Search", class: "btn btn-secondary" %>
<% end %>

View file

@ -1,16 +1,17 @@
require "rails_helper"
RSpec.describe "Admin awards badges", type: :system do
RSpec.describe "Admin manages reports", type: :system do
let(:admin) { create(:user, :super_admin) }
def clear_search_boxes
fill_in "q_reporter_username_cont", with: ""
fill_in "q_reported_url_cont", with: ""
select "", from: "q_status_eq"
end
before do
sign_in admin
visit "/internal/reports"
visit internal_feedback_messages_path
end
it "loads the view" do