Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit afc09db

Browse files
committed
remove tests 2
1 parent 5e615c8 commit afc09db

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

spec/plugin_spec.rb

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
# frozen_string_literal: true
22

3-
require_relative "support/toxicity_inference_stubs"
4-
53
describe Plugin::Instance do
6-
before do
7-
SiteSetting.discourse_ai_enabled = true
8-
SiteSetting.ai_toxicity_inference_service_api_endpoint = "http://example.com"
9-
end
10-
11-
describe "on reviewable_transitioned_to event" do
12-
fab!(:post)
13-
fab!(:admin)
14-
15-
it "adjusts model accuracy" do
16-
ToxicityInferenceStubs.stub_post_classification(post, toxic: true)
17-
SiteSetting.ai_toxicity_flag_automatically = true
18-
classification = DiscourseAi::Toxicity::ToxicityClassification.new
19-
classificator = DiscourseAi::PostClassificator.new(classification)
20-
classificator.classify!(post)
21-
reviewable = ReviewableAiPost.find_by(target: post)
22-
23-
reviewable.perform admin, :agree_and_keep
24-
accuracy = ModelAccuracy.find_by(classification_type: classification.type)
25-
26-
expect(accuracy.flags_agreed).to eq(1)
27-
end
28-
end
4+
before { SiteSetting.discourse_ai_enabled = true }
295

306
describe "current_user_serializer#ai_helper_prompts" do
317
fab!(:user)

0 commit comments

Comments
 (0)