gitlab-org--gitlab-foss/spec/lib/gitlab/ci_access_spec.rb
2017-06-05 05:32:26 -07:00

15 lines
423 B
Ruby

require 'spec_helper'
describe Gitlab::CiAccess, lib: true do
let(:access) { Gitlab::CiAccess.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