Welcome to mirror list, hosted at ThFree Co, Russian Federation.

featurable_shared_examples.rb « concerns « models « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f165ef604fe8aeb7d71b7f86cc7e97195fe2022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

RSpec.shared_examples 'access level validation' do |features|
  features.each do |feature|
    it "does not allow public access level for #{feature}" do
      field = "#{feature}_access_level".to_sym
      container_features.update_attribute(field, ProjectFeature::PUBLIC)

      expect(container_features.valid?).to be_falsy, "#{field} failed"
    end
  end
end