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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/policies/project_policy_spec.rb')
-rw-r--r--spec/policies/project_policy_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 2854d6daece..350d834e63e 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -578,6 +578,11 @@ RSpec.describe ProjectPolicy, feature_category: :system_access do
expect(described_class.new(maintainer, project)).to be_allowed(:admin_incident_management_timeline_event_tag)
expect(described_class.new(owner, project)).to be_allowed(:admin_incident_management_timeline_event_tag)
end
+
+ it 'allows to read import error' do
+ expect(described_class.new(maintainer, project)).to be_allowed(:read_import_error)
+ expect(described_class.new(owner, project)).to be_allowed(:read_import_error)
+ end
end
context 'when user is a developer/guest/reporter' do
@@ -586,6 +591,12 @@ RSpec.describe ProjectPolicy, feature_category: :system_access do
expect(described_class.new(guest, project)).to be_disallowed(:admin_incident_management_timeline_event_tag)
expect(described_class.new(reporter, project)).to be_disallowed(:admin_incident_management_timeline_event_tag)
end
+
+ it 'disallows reading the import error' do
+ expect(described_class.new(developer, project)).to be_disallowed(:read_import_error)
+ expect(described_class.new(guest, project)).to be_disallowed(:read_import_error)
+ expect(described_class.new(reporter, project)).to be_disallowed(:read_import_error)
+ end
end
context 'when user is not a member of the project' do