Add tests for admin bounced mails views

This commit is contained in:
Karl Erik Õunapuu 2020-09-18 16:17:42 +03:00
parent 64308e1104
commit 101d5d4a78
No known key found for this signature in database
GPG key ID: C9DD647298A34764
5 changed files with 82 additions and 15 deletions

View file

@ -26,15 +26,5 @@ module Admin
def set_bounced_mail_address
@bounced_mail_address = BouncedMailAddress.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def bounced_mail_address_params
params.require(:bounced_mail_address).permit(
:email,
:bounce_reason,
:incidents,
:response_json
)
end
end
end

View file

@ -1,5 +1,3 @@
<p id="notice"><%= notice %></p>
<h1>Bounced Mail Addresses</h1>
<div class="row">

View file

@ -1,6 +1,3 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Email:</strong>
<%= @bounced_mail_address.email %>
</p>
@ -26,3 +23,4 @@
</p>
<%= link_to 'Back', admin_bounced_mail_addresses_path %>
<%= link_to 'Destroy', admin_bounced_mail_address_path(@bounced_mail_address), method: :delete, data: { confirm: 'Are you sure?' } %></td>