Friday, September 20, 2024 2:52:17 AM
> settings

Customize


Authenticate

> community_default_spec.rb
# frozen_string_literal: true

describe ESM::CommunityDefault do
  let!(:community) { ESM::Test.community }
  let!(:server) { ESM::Test.server(for: community) }
  let(:channel) { ESM::Test.channel(in: community) }

  it "is valid" do
    expect {
      # A default can be global for the entire Discord
      result = create(:community_default, community: community, server: server)
      expect(result.channel_id).to be(nil)

      # Or local to a channel
      create(:community_default, community: community, server: server, channel_id: channel.id.to_s)
    }.not_to raise_error
  end
end
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8