Skip to content

Commit

Permalink
Add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cmm-cjohnson committed Jun 24, 2019
1 parent 7aa87aa commit 7c69559
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/sql_footprint/sql_anonymizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
)
end

it 'handles multi-line VALUES' do
sql = 'INSERT INTO "widgets" ("created_at", "name") VALUES ' \
"('2016-05-1 6 19:16:04.981048', 'asdf\nasdf') RETURNING \"id\""
expect(anonymizer.anonymize(sql)).to eq 'INSERT INTO "widgets" ' \
'("created_at", "name") VALUES (values-redacted) RETURNING "id"'
end

context 'with a custom rule' do
let(:redacted) { 'SELECT [redacted] AS [redacted]'.freeze }

Expand Down

0 comments on commit 7c69559

Please sign in to comment.