Skip to content

Commit

Permalink
amend test
Browse files Browse the repository at this point in the history
  • Loading branch information
twosatsmaxi committed Sep 5, 2024
1 parent c0788d8 commit 08e9ead
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6261,19 +6261,15 @@ next
};

server.assert_response(
format!("/r/children/{parent_inscription_id}"),
format!("/r/children/{parent_inscription_id}/inscriptions/at/-1"),
StatusCode::NOT_FOUND,
&format!("inscription {parent_inscription_id} not found"),
);

server.mine_blocks(1);

let children_json =
server.get_json::<api::Children>(format!("/r/children/{parent_inscription_id}"));
assert_eq!(children_json.ids.len(), 0);

let mut builder = script::Builder::new();
for _ in 0..111 {
for _ in 0..70 {
builder = Inscription {
content_type: Some("text/plain".into()),
body: Some("hello".into()),
Expand All @@ -6292,11 +6288,11 @@ next
});

server.mine_blocks(1);
let latest_child_inscription_id = InscriptionId { txid, index: 110 };
let children_json = server.get_json::<api::ChildInscriptionRecursive>(format!(
let latest_child_inscription_id = InscriptionId { txid, index: 69 };
let child_json = server.get_json::<api::ChildInscriptionRecursive>(format!(
"/r/children/{parent_inscription_id}/inscriptions/at/-1"
));
assert_eq!(children_json.id, latest_child_inscription_id);
assert_eq!(child_json.id, latest_child_inscription_id);
}

#[test]
Expand Down

0 comments on commit 08e9ead

Please sign in to comment.