mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 17:15:32 +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.
28 lines
702 B
Ruby
28 lines
702 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Reviewables", type: :system do
|
|
fab!(:current_user) { Fabricate(:admin) }
|
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
|
fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel_1) }
|
|
|
|
before do
|
|
chat_system_bootstrap(current_user)
|
|
channel_1.add(current_user)
|
|
sign_in(current_user)
|
|
|
|
Chat::ReviewQueue.new.flag_message(
|
|
message_1,
|
|
current_user.guardian,
|
|
ReviewableScore.types[:spam],
|
|
)
|
|
end
|
|
|
|
context "when visiting reviews for messages " do
|
|
it "lists the correct message" do
|
|
visit("/review?type=Chat%3A%3AReviewableMessage")
|
|
|
|
expect(page).to have_content(message_1.message)
|
|
end
|
|
end
|
|
end
|