Skip to content

Instantly share code, notes, and snippets.

@ryansch
Created July 29, 2014 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryansch/9a4b9a18a845714a18a9 to your computer and use it in GitHub Desktop.
Save ryansch/9a4b9a18a845714a18a9 to your computer and use it in GitHub Desktop.
Failing parse test for dmarc gem
Failures:
1) DMARC::Parser#dmarc_record parses version, policy, and rua
Failure/Error: expect(subject.parse record).to eq([
expected: [{:v=>"DMARC1"}, {:p=>"quarantine"}, {:rua=>"mailto:foo@example.com"}, {:rua=>"mailto:bar@example.com"}]
got: [{:v=>"DMARC1"@2}, {:p=>"quarantine"@11}]
(compared using ==)
Diff:
@@ -1,5 +1,2 @@
-[{:v=>"DMARC1"},
- {:p=>"quarantine"},
- {:rua=>"mailto:foo@example.com"},
- {:rua=>"mailto:bar@example.com"}]
+[{:v=>"DMARC1"@2}, {:p=>"quarantine"@11}]
# ./spec/lib/dmarc/parser_spec.rb:48:in `block (3 levels) in <top (required)>'
# in describe '#dmarc_record'
it 'parses version, policy, and rua' do
record = 'v=DMARC1;p=quarantine;rua=mailto:foo@example.com,mailto:bar@example.com'
expect(subject.parse record).to eq([
{v: 'DMARC1'},
{p: 'quarantine'},
{rua: 'mailto:foo@example.com'},
{rua: 'mailto:bar@example.com'}
])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment