commit
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
mod helpers;
|
||||
|
||||
use helpers::test_data::{TestChatBuilder, create_test_chat};
|
||||
use helpers::app_builder::TestAppBuilder;
|
||||
use helpers::snapshot_utils::{render_to_buffer, buffer_to_string};
|
||||
use helpers::snapshot_utils::{buffer_to_string, render_to_buffer};
|
||||
use helpers::test_data::{create_test_chat, TestChatBuilder};
|
||||
use insta::assert_snapshot;
|
||||
|
||||
#[test]
|
||||
@@ -44,9 +44,7 @@ fn snapshot_chat_with_unread_count() {
|
||||
.last_message("Привет, как дела?")
|
||||
.build();
|
||||
|
||||
let mut app = TestAppBuilder::new()
|
||||
.with_chat(chat)
|
||||
.build();
|
||||
let mut app = TestAppBuilder::new().with_chat(chat).build();
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::chat_list::render(f, f.area(), &mut app);
|
||||
@@ -63,9 +61,7 @@ fn snapshot_chat_with_pinned() {
|
||||
.last_message("Pinned message")
|
||||
.build();
|
||||
|
||||
let mut app = TestAppBuilder::new()
|
||||
.with_chat(chat)
|
||||
.build();
|
||||
let mut app = TestAppBuilder::new().with_chat(chat).build();
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::chat_list::render(f, f.area(), &mut app);
|
||||
@@ -83,9 +79,7 @@ fn snapshot_chat_with_muted() {
|
||||
.last_message("Too many messages")
|
||||
.build();
|
||||
|
||||
let mut app = TestAppBuilder::new()
|
||||
.with_chat(chat)
|
||||
.build();
|
||||
let mut app = TestAppBuilder::new().with_chat(chat).build();
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::chat_list::render(f, f.area(), &mut app);
|
||||
@@ -103,9 +97,7 @@ fn snapshot_chat_with_mentions() {
|
||||
.last_message("@me check this out")
|
||||
.build();
|
||||
|
||||
let mut app = TestAppBuilder::new()
|
||||
.with_chat(chat)
|
||||
.build();
|
||||
let mut app = TestAppBuilder::new().with_chat(chat).build();
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::chat_list::render(f, f.area(), &mut app);
|
||||
@@ -139,9 +131,7 @@ fn snapshot_chat_long_title() {
|
||||
.last_message("Test message")
|
||||
.build();
|
||||
|
||||
let mut app = TestAppBuilder::new()
|
||||
.with_chat(chat)
|
||||
.build();
|
||||
let mut app = TestAppBuilder::new().with_chat(chat).build();
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::chat_list::render(f, f.area(), &mut app);
|
||||
|
||||
Reference in New Issue
Block a user