diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/models/email_spec.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/email_spec.rb')
-rw-r--r-- | spec/models/email_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/models/email_spec.rb b/spec/models/email_spec.rb index 62f2a53ab3c..cd0938682db 100644 --- a/spec/models/email_spec.rb +++ b/spec/models/email_spec.rb @@ -44,12 +44,11 @@ RSpec.describe Email do end end - describe 'delegation' do - let(:user) { create(:user) } - - it 'delegates to :user' do - expect(build(:email, user: user).username).to eq user.username - end + describe 'delegations' do + it { is_expected.to delegate_method(:can?).to(:user) } + it { is_expected.to delegate_method(:username).to(:user) } + it { is_expected.to delegate_method(:pending_invitations).to(:user) } + it { is_expected.to delegate_method(:accept_pending_invitations!).to(:user) } end describe 'Devise emails' do |