diff --git a/plugins/chat/spec/system/document_title_spec.rb b/plugins/chat/spec/system/document_title_spec.rb index 83250eae3d7..6349fa6cefd 100644 --- a/plugins/chat/spec/system/document_title_spec.rb +++ b/plugins/chat/spec/system/document_title_spec.rb @@ -17,7 +17,7 @@ RSpec.describe "Document title", type: :system do it "shows the channel name in the document title" do chat_page.visit_channel(channel_1) - expect(page.title).to start_with("##{channel_1.title}") + expect(page).to have_title("##{channel_1.title}") end end @@ -33,7 +33,7 @@ RSpec.describe "Document title", type: :system do it "shows the channel name in the document title" do chat_page.visit_channel(channel_1) - expect(page.title).to start_with("#{channel_1.title(current_user)}") + expect(page).to have_title("#{channel_1.title(current_user)}") end end end