diff options
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 96e06e617d5..ee21b857fc8 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -337,16 +337,13 @@ RSpec.describe Namespace do end describe 'delegate' do - it { is_expected.to delegate_method(:name).to(:owner).with_prefix.with_arguments(allow_nil: true) } - it { is_expected.to delegate_method(:avatar_url).to(:owner).with_arguments(allow_nil: true) } - it do - is_expected.to delegate_method(:prevent_sharing_groups_outside_hierarchy) - .to(:namespace_settings).with_arguments(allow_nil: true) - end + it { is_expected.to delegate_method(:name).to(:owner).with_prefix.allow_nil } + it { is_expected.to delegate_method(:avatar_url).to(:owner).allow_nil } + it { is_expected.to delegate_method(:prevent_sharing_groups_outside_hierarchy).to(:namespace_settings).allow_nil } it do - is_expected.to delegate_method(:prevent_sharing_groups_outside_hierarchy=) - .to(:namespace_settings).with_arguments(allow_nil: true) + is_expected.to delegate_method(:prevent_sharing_groups_outside_hierarchy=).to(:namespace_settings) + .with_arguments(:args).allow_nil end end |