discourse/spec/fabricators/user_history_fabricator.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
502 B
Ruby
Raw Normal View History

# frozen_string_literal: true
Fabricator(:user_history) { acting_user { Fabricate(:user) } }
Fabricator(:site_setting_change_history, from: :user_history) do
action { UserHistory.actions[:change_site_setting] }
previous_value { "old value" }
new_value { "new value" }
subject { "some_site_setting" }
end
Fabricator(:topic_closed_change_history, from: :user_history) do
action { UserHistory.actions[:topic_closed] }
subject { "some_site_setting" }
topic_id { Fabricate(:topic).id }
end