Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPickering committed Nov 11, 2024
1 parent 20b3428 commit 6940a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions crates/tui/src/view/component/queryable_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,7 @@ mod tests {

// Assert state
let data = component.data();
// Remove newline after this fix:
// https://github.com/ratatui-org/ratatui/pull/1320
let mut expected = String::from_utf8(TEXT.to_owned()).unwrap();
expected.push('\n');
let expected = String::from_utf8(TEXT.to_owned()).unwrap();
assert_eq!(data.parsed_text().as_deref(), None);
assert!(!data.query_available.get());
assert_eq!(data.query, None);
Expand Down
6 changes: 2 additions & 4 deletions crates/tui/src/view/component/response_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,14 @@ mod tests {
body: b"hello!".to_vec().into(),
..ResponseRecord::factory(())
},
"hello!\n",
"hello!",
)]
#[case::binary_body(
ResponseRecord {
body: b"\x01\x02\x03\xff".to_vec().into(),
..ResponseRecord::factory(())
},
// Remove newline after this fix:
// https://github.com/ratatui-org/ratatui/pull/1320
"01 02 03 ff\n"
"01 02 03 ff"
)]
#[tokio::test]
async fn test_copy_body(
Expand Down

0 comments on commit 6940a6c

Please sign in to comment.