2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
require 'fast_spec_helper'
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Gitlab::CiAccess do
|
2017-09-10 17:25:29 +05:30
|
|
|
let(:access) { described_class.new }
|
|
|
|
|
|
|
|
describe '#can_do_action?' do
|
|
|
|
context 'when action is :build_download_code' do
|
|
|
|
it { expect(access.can_do_action?(:build_download_code)).to be_truthy }
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when action is not :build_download_code' do
|
|
|
|
it { expect(access.can_do_action?(:download_code)).to be_falsey }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|