mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 03:27:58 +00:00
Fix forks_should_work_correctly test (#4152)
When we enabled arbitary precision for `serde_json`, the feature leaked through the whole workspace. The given test fails because of some bug in serde json when the feature is enabled.
This commit is contained in:
committed by
Gavin Wood
parent
364df30970
commit
75a0a3f6fd
@@ -289,7 +289,9 @@ mod tests {
|
||||
fn forks_should_work_correctly() {
|
||||
use super::Extension as _ ;
|
||||
|
||||
let ext: Ext2 = serde_json::from_str(r#"
|
||||
// We first need to deserialize into a `Value` because of the following bug:
|
||||
// https://github.com/serde-rs/json/issues/505
|
||||
let ext_val: serde_json::Value = serde_json::from_str(r#"
|
||||
{
|
||||
"test": 11,
|
||||
"forkable": {
|
||||
@@ -314,6 +316,8 @@ mod tests {
|
||||
}
|
||||
"#).unwrap();
|
||||
|
||||
let ext: Ext2 = serde_json::from_value(ext_val).unwrap();
|
||||
|
||||
assert_eq!(ext.get::<Extension1>(), Some(&Extension1 {
|
||||
test: 11
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user