diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-10 00:07:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-10 00:07:17 +0300 |
commit | 94a2edbe7984384df4c3fb7efa308af2e0f42d8c (patch) | |
tree | 96b563670ef5d790a4e97f8d153dc667d971ef64 /spec/policies/concerns | |
parent | 7d8fc3b6b67a22969cd1fa5cb018fc22e6aa1ade (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/concerns')
-rw-r--r-- | spec/policies/concerns/archived_abilities_spec.rb | 27 | ||||
-rw-r--r-- | spec/policies/concerns/readonly_abilities_spec.rb | 27 |
2 files changed, 27 insertions, 27 deletions
diff --git a/spec/policies/concerns/archived_abilities_spec.rb b/spec/policies/concerns/archived_abilities_spec.rb new file mode 100644 index 00000000000..8e3fd8a209f --- /dev/null +++ b/spec/policies/concerns/archived_abilities_spec.rb @@ -0,0 +1,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 diff --git a/spec/policies/concerns/readonly_abilities_spec.rb b/spec/policies/concerns/readonly_abilities_spec.rb deleted file mode 100644 index 864924a091d..00000000000 --- a/spec/policies/concerns/readonly_abilities_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ReadonlyAbilities do - let(:test_class) do - Class.new do - include ReadonlyAbilities - end - end - - before do - stub_const('TestClass', test_class) - end - - describe '.readonly_abilities' do - it 'returns an array of abilites to be prevented when readonly' do - expect(TestClass.readonly_abilities).to include(*described_class::READONLY_ABILITIES) - end - end - - describe '.readonly_features' do - it 'returns an array of features to be prevented when readonly' do - expect(TestClass.readonly_features).to include(*described_class::READONLY_FEATURES) - end - end -end |