gitlab-org--gitlab-foss/spec/lib/gitlab/ci_access_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
453 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'fast_spec_helper'
2017-05-22 19:44:59 +00:00
RSpec.describe Gitlab::CiAccess do
let(:access) { described_class.new }
2017-05-22 19:44:59 +00:00
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