diff options
Diffstat (limited to 'spec/lib/api/entities/release_spec.rb')
-rw-r--r-- | spec/lib/api/entities/release_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/api/entities/release_spec.rb b/spec/lib/api/entities/release_spec.rb index aa2c5126bb9..d1e5f191614 100644 --- a/spec/lib/api/entities/release_spec.rb +++ b/spec/lib/api/entities/release_spec.rb @@ -16,13 +16,13 @@ RSpec.describe API::Entities::Release do end describe 'evidences' do - context 'when the current user can download code' do + context 'when the current user can read code' do let(:entity_evidence) { entity[:evidences].first } it 'exposes the evidence sha and the json path' do allow(Ability).to receive(:allowed?).and_call_original allow(Ability).to receive(:allowed?) - .with(user, :download_code, project).and_return(true) + .with(user, :read_code, project).and_return(true) expect(entity_evidence[:sha]).to eq(evidence.summary_sha) expect(entity_evidence[:collected_at]).to eq(evidence.collected_at) @@ -36,11 +36,11 @@ RSpec.describe API::Entities::Release do end end - context 'when the current user cannot download code' do + context 'when the current user cannot read code' do it 'does not expose any evidence data' do allow(Ability).to receive(:allowed?).and_call_original allow(Ability).to receive(:allowed?) - .with(user, :download_code, project).and_return(false) + .with(user, :read_code, project).and_return(false) expect(entity.keys).not_to include(:evidences) end |