summaryrefslogtreecommitdiff
path: root/spec/policies/concerns/archived_abilities_spec.rb
blob: 8e3fd8a209feccf817f30c1237ceb39e08c582b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ArchivedAbilities, feature_category: :projects do
  let(:test_class) do
    Class.new do
      include ArchivedAbilities
    end
  end

  before do
    stub_const('TestClass', test_class)
  end

  describe '.archived_abilities' do
    it 'returns an array of abilites to be prevented when archived' do
      expect(TestClass.archived_abilities).to include(*described_class::ARCHIVED_ABILITIES)
    end
  end

  describe '.archived_features' do
    it 'returns an array of features to be prevented when archived' do
      expect(TestClass.archived_features).to include(*described_class::ARCHIVED_FEATURES)
    end
  end
end