Skip to content

Commit

Permalink
fix: naming of BrReg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mollemoll committed May 15, 2024
1 parent b1eb156 commit 912e3e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/no_vat/brreg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ lazy_static! {
}

#[derive(Debug)]
pub struct BRReg;
pub struct BrReg;

impl BRReg {
impl BrReg {
fn qualify(&self, hash: &serde_json::Map<String, serde_json::Value>) -> VerificationStatus {
let mut valid = true;
for (key, value) in REQUIREMENTS_TO_BE_VALID.iter() {
Expand All @@ -56,7 +56,7 @@ impl BRReg {
}
}

impl Verifier for BRReg {
impl Verifier for BrReg {
fn make_request(&self, tax_id: &TaxId) -> Result<VerificationResponse, VerificationError> {
let client = reqwest::blocking::Client::new();
let res = client
Expand Down Expand Up @@ -131,7 +131,7 @@ mod tests {
}"#.to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response).unwrap();
assert_eq!(verification.status(), &VerificationStatus::Verified);
assert_eq!(verification.data(), &json!({
Expand Down Expand Up @@ -162,7 +162,7 @@ mod tests {
r#"{}"#.to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response).unwrap();
assert_eq!(verification.status(), &VerificationStatus::Unverified);
assert_eq!(verification.data(), &json!({}));
Expand All @@ -182,7 +182,7 @@ mod tests {
}"#.to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response).unwrap();
assert_eq!(verification.status(), &VerificationStatus::Unverified);
assert_eq!(verification.data(), &json!({
Expand Down Expand Up @@ -210,7 +210,7 @@ mod tests {
"#.to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response).unwrap();
assert_eq!(verification.status(), &VerificationStatus::Unverified);
assert_eq!(verification.data(), &json!({}));
Expand All @@ -232,7 +232,7 @@ mod tests {
"#.to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response).unwrap();
assert_eq!(verification.status(), &VerificationStatus::Unavailable);
assert_eq!(verification.data(), &json!({
Expand All @@ -252,7 +252,7 @@ mod tests {
"".to_string()
);

let verifier = BRReg;
let verifier = BrReg;
let verification = verifier.parse_response(response);
assert_eq!(verification.is_err(), true);
match verification {
Expand Down
2 changes: 1 addition & 1 deletion src/no_vat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl TaxIdType for NoVat {
}

fn verifier(&self) -> Box<dyn Verifier> {
Box::new(brreg::BRReg)
Box::new(brreg::BrReg)
}
}

Expand Down

0 comments on commit 912e3e2

Please sign in to comment.