Skip to content

Commit

Permalink
test: changing type to look for serde eq instead of value eq
Browse files Browse the repository at this point in the history
  • Loading branch information
sagojez committed Dec 7, 2024
1 parent 894de32 commit 7c25c01
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions integrationos-api/tests/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{
};

use serde::{de::DeserializeOwned, Serialize};
use serde_json::Value;

pub enum CheckType {
Json,
Expand Down Expand Up @@ -87,10 +86,10 @@ impl JsonChecker for JsonCheckerImpl {
file.read_to_string(&mut contents)
.expect("Failed to read file contents");

let expected = serde_json::from_str::<Value>(&contents)
let expected = serde_json::from_str::<T>(&contents)
.expect("Failed to deserialize expect value");

let actual = serde_json::from_str::<Value>(&serialized)
let actual = serde_json::from_str::<T>(&serialized)
.expect("Failed to deserialize actual value");

expected == actual
Expand Down

0 comments on commit 7c25c01

Please sign in to comment.