diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-10 19:39:26 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-14 19:14:11 +0300 |
commit | 260c8da060a6039cbd47cfe31c8ec6d6f9b43de0 (patch) | |
tree | bd6dd444c6f416c7209d88bf80e0e9322037758d /spec/models/protectable_dropdown_spec.rb | |
parent | a64760d6d0a9bc0ce0747de349d37f3c46a1c221 (diff) |
Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
Diffstat (limited to 'spec/models/protectable_dropdown_spec.rb')
-rw-r--r-- | spec/models/protectable_dropdown_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/protectable_dropdown_spec.rb b/spec/models/protectable_dropdown_spec.rb index 5c5dcd9f5c9..d4433a88a15 100644 --- a/spec/models/protectable_dropdown_spec.rb +++ b/spec/models/protectable_dropdown_spec.rb @@ -4,6 +4,13 @@ describe ProtectableDropdown do let(:project) { create(:project, :repository) } let(:subject) { described_class.new(project, :branches) } + describe 'initialize' do + it 'raises ArgumentError for invalid ref type' do + expect { described_class.new(double, :foo) } + .to raise_error(ArgumentError, "invalid ref type `foo`") + end + end + describe '#protectable_ref_names' do before do project.protected_branches.create(name: 'master') |