mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-09 21:29:06 -05:00
fix: test failures
This commit is contained in:
parent
030b64de62
commit
6f166433b5
|
@ -208,10 +208,10 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn invalid_filter() {
|
fn legacy_filter() {
|
||||||
// unrecognized field in filter
|
// legacy field in filter
|
||||||
let raw_json = "[\"REQ\",\"some-id\",{\"foo\": 3}]";
|
let raw_json = "[\"REQ\",\"some-id\",{\"kind\": 3}]";
|
||||||
assert!(serde_json::from_str::<Subscription>(raw_json).is_err());
|
assert!(serde_json::from_str::<Subscription>(raw_json).is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -249,7 +249,8 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn interest_time_and_id() -> Result<()> {
|
fn interest_time_and_id() -> Result<()> {
|
||||||
// subscription with a filter for ID and time
|
// subscription with a filter for ID and time
|
||||||
let s: Subscription = serde_json::from_str(r#"["REQ","xyz",{"ids": ["abc"], "since": 1000}]"#)?;
|
let s: Subscription =
|
||||||
|
serde_json::from_str(r#"["REQ","xyz",{"ids": ["abc"], "since": 1000}]"#)?;
|
||||||
let e = Event {
|
let e = Event {
|
||||||
id: "abc".to_owned(),
|
id: "abc".to_owned(),
|
||||||
pubkey: "".to_owned(),
|
pubkey: "".to_owned(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user