Skip to content

Commit

Permalink
[ExcelAnalyzer] refactor metadata rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed May 24, 2024
1 parent 06a0e93 commit b64239d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/views/excel_analyzer/notifier_mailer/report.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ spreadsheet due to the detection of potentially suspect hidden data.
Admin request URL: <%= admin_request_url(@incoming_message.info_request_id) %>
Admin attachment URL: <%= edit_admin_foi_attachment_url(@foi_attachment) %>

The following was detected:
<% @metadata[:excel].each do |key, value| %>
<%= key %>: <%= value %>
<% end %>
Excel Analyzer metadata: <%= JSON.pretty_generate(@metadata[:excel]) %>

Please review the file carefully.
2 changes: 1 addition & 1 deletion spec/excel_analyzer/mailers/notifier_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@

it 'includes the metadata in the body' do
allow(blob).to receive(:metadata).and_return(excel: { foo: 'bar' })
expect(mail.body).to include('foo: bar')
expect(mail.body).to include('"foo": "bar"')
end
end

0 comments on commit b64239d

Please sign in to comment.