Skip to content

Commit 4ac55cf

Browse files
committed
chore(tests): Fix tests and re-enable them
1 parent 1f87e50 commit 4ac55cf

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/spf/validate/tests/mod.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ mod validate {
77
use crate::spf::mechanism::{Mechanism, Qualifier};
88

99
#[test]
10-
#[ignore]
1110
fn validate() {
1211
let mut spf: SpfBuilder<Builder> = SpfBuilder::new();
1312
spf.set_v1();
@@ -19,19 +18,8 @@ mod validate {
1918
Qualifier::Pass,
2019
"2001:5160:4000::/36".parse().unwrap(),
2120
));
22-
/*
23-
assert_eq!(
24-
spf.validate_to_string(SpfRfcStandard::Rfc4408).to_string(),
25-
"v=spf1 ip4:203.32.160.0/23 ip6:2001:5160:4000::/36".to_string()
26-
);
27-
let res = spf.validate(SpfRfcStandard::Rfc4408);
28-
assert_eq!(res.is_ok(), true);
29-
let res2 = res.unwrap();
30-
assert_eq!(
31-
res2.to_string(),
32-
"v=spf1 ip4:203.32.160.0/23 ip6:2001:5160:4000::/36".to_string()
33-
);
34-
*/
21+
let spf = spf.build().unwrap();
22+
assert!(spf.validate().is_ok());
3523
}
3624
#[test]
3725
// todo: This needs to be fixed

src/spf/validate/validate_builder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ mod tests {
232232
assert_eq!(spf.validate_redirect_all(), Ok(()));
233233
}
234234
#[test]
235-
#[ignore]
236-
// This test will fail with the current implementation.
237-
// Adding a `All` will quietly fail with the current code when a redirect is already
238-
// present.
239235
fn test_redirect_all_not_ok() {
240236
let mut spf: SpfBuilder<Builder> = SpfBuilder::default();
241237
spf.set_v1();

0 commit comments

Comments
 (0)