diff options
Diffstat (limited to 'spec/presenters/issue_presenter_spec.rb')
-rw-r--r-- | spec/presenters/issue_presenter_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb index f08cd0f2026..55a6b50ffa7 100644 --- a/spec/presenters/issue_presenter_spec.rb +++ b/spec/presenters/issue_presenter_spec.rb @@ -40,4 +40,20 @@ RSpec.describe IssuePresenter do expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/-/issues/#{issue.iid}") end end + + describe '#project_emails_disabled?' do + subject { presenter.project_emails_disabled? } + + it 'returns false when emails notifications is enabled for project' do + is_expected.to be(false) + end + + context 'when emails notifications is disabled for project' do + before do + allow(project).to receive(:emails_disabled?).and_return(true) + end + + it { is_expected.to be(true) } + end + end end |