This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +1
-24
lines changed
spec/lib/modules/sentiment Expand file tree Collapse file tree 3 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ discourse_ai:
1818 default : " "
1919 json_schema : DiscourseAi::Sentiment::SentimentSiteSettingJsonSchema
2020 ai_sentiment_backfill_maximum_posts_per_hour :
21- default : 250
21+ default : 2500
2222 min : 0
2323 max : 10000
2424 hidden : true
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ def inject_into(plugin)
1111 end
1212 end
1313
14- plugin . on ( :post_created , &sentiment_analysis_cb )
1514 plugin . on ( :post_edited , &sentiment_analysis_cb )
1615
1716 plugin . add_to_serializer ( :current_user , :can_see_sentiment_reports ) do
Original file line number Diff line number Diff line change 66 fab! ( :user ) { Fabricate ( :user , refresh_auto_groups : true ) }
77
88 describe "registering event callbacks" do
9- context "when creating a post" do
10- let ( :creator ) do
11- PostCreator . new (
12- user ,
13- raw : "this is the new content for my topic" ,
14- title : "this is my new topic title" ,
15- )
16- end
17-
18- it "queues a job on create if sentiment analysis is enabled" do
19- SiteSetting . ai_sentiment_enabled = true
20-
21- expect { creator . create } . to change ( Jobs ::PostSentimentAnalysis . jobs , :size ) . by ( 1 )
22- end
23-
24- it "does nothing if sentiment analysis is disabled" do
25- SiteSetting . ai_sentiment_enabled = false
26-
27- expect { creator . create } . not_to change ( Jobs ::PostSentimentAnalysis . jobs , :size )
28- end
29- end
30-
319 context "when editing a post" do
3210 fab! ( :post ) { Fabricate ( :post , user : user ) }
3311 let ( :revisor ) { PostRevisor . new ( post ) }
You can’t perform that action at this time.
0 commit comments