A platform for community discussion. Free, open, simple.
# frozen_string_literal: true
RSpec.describe "Topic Voting badge seeds" do
let(:badge_names) { DiscourseTopicVoting::BADGE_NAMES }
describe "seeding the Topic Voting badges on a new site" do
it "enables the badges by default" do
Badge.where(name: badge_names).delete_all
load Rails.root.join("plugins/discourse-topic-voting/db/fixtures/001_badges.rb") # rubocop:disable Discourse/Plugins/UseRequireRelative
expect(Badge.where(name: badge_names).pluck(:enabled)).to all(eq(true))
end
end
end