Skip to content

Commit

Permalink
[ExcelAnalyzer] add PII output to report email
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed May 24, 2024
1 parent b64239d commit abe7b77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/views/excel_analyzer/notifier_mailer/report.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ Admin attachment URL: <%= edit_admin_foi_attachment_url(@foi_attachment) %>

Excel Analyzer metadata: <%= JSON.pretty_generate(@metadata[:excel]) %>

PII Badger metadata: <%= JSON.pretty_generate(@metadata[:pii_badger]) %>

Please review the file carefully.
5 changes: 4 additions & 1 deletion spec/excel_analyzer/mailers/notifier_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
end

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

0 comments on commit abe7b77

Please sign in to comment.