Skip to content

Commit

Permalink
review: Clean tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Jun 26, 2024
1 parent 5151a4f commit 51a9441
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,15 @@ mod tests {
.find(|(d, _)| d.device_id() == KeyDistributionTestData::dan_unsigned_device_id())
.expect("This dan's device should receive a withheld code");

assert_eq!(code.as_str(), WithheldCode::Unverified.as_str());
assert_eq!(code, &WithheldCode::Unverified);

let (_, code) = share_result
.withheld_devices
.iter()
.find(|(d, _)| d.device_id() == KeyDistributionTestData::dave_device_id())
.expect("This daves's device should receive a withheld code");

assert_eq!(code.as_str(), WithheldCode::Unverified.as_str());
assert_eq!(code, &WithheldCode::Unverified);
}

#[async_test]
Expand Down Expand Up @@ -517,7 +517,7 @@ mod tests {
.find(|(d, _)| d.device_id() == KeyDistributionTestData::dan_unsigned_device_id())
.expect("This dan's device should receive a withheld code");

assert_eq!(code.as_str(), WithheldCode::Unauthorised.as_str());
assert_eq!(code, &WithheldCode::Unauthorised);

// Check withhelds for others
let (_, code) = share_result
Expand All @@ -526,7 +526,7 @@ mod tests {
.find(|(d, _)| d.device_id() == KeyDistributionTestData::dave_device_id())
.expect("This dave device should receive a withheld code");

assert_eq!(code.as_str(), WithheldCode::Unauthorised.as_str());
assert_eq!(code, &WithheldCode::Unauthorised);
}

#[async_test]
Expand Down

0 comments on commit 51a9441

Please sign in to comment.