mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 23:43:54 +08:00
41f8bff2c3
Why this change? It is very unlikely that we need to ever JS for system tests considering that we rely on a JS framework on the frontend.
22 lines
471 B
Ruby
22 lines
471 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Deleted channel", type: :system do
|
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
|
|
|
let(:chat_page) { PageObjects::Pages::Chat.new }
|
|
|
|
before do
|
|
chat_system_bootstrap
|
|
channel_1.destroy!
|
|
sign_in(Fabricate(:user))
|
|
end
|
|
|
|
context "when visiting deleted channel" do
|
|
it "redirects to homepage" do
|
|
chat_page.visit_channel(channel_1)
|
|
|
|
expect(page).to have_current_path("/latest")
|
|
end
|
|
end
|
|
end
|