Created
July 29, 2014 19:16
-
-
Save ryansch/9a4b9a18a845714a18a9 to your computer and use it in GitHub Desktop.
Failing parse test for dmarc gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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