discourse-ai/spec/fabricators/classification_result_fabricator.rb
Roman Rizzi b172ef11c4
FEATURE: Expose sentiment classifications via the admin dashboard. (#284)
This PR adds new reports for displaying information about post sentiments grouped by date and emotions group by TL.

Depends on discourse/discourse#24274
2023-11-08 10:50:37 -03:00

14 lines
442 B
Ruby

# frozen_string_literal: true
Fabricator(:classification_result) { target { Fabricate(:post) } }
Fabricator(:sentiment_classification, from: :classification_result) do
classification_type "sentiment"
classification { { negative: 72, neutral: 23, positive: 4 } }
end
Fabricator(:emotion_classification, from: :classification_result) do
classification_type "emotion"
classification { { negative: 72, neutral: 23, positive: 4 } }
end