diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:26 +0000 |
commit | 587794b4b8a6e919e77ee4abe8215fa291e6a91d (patch) | |
tree | 380d6578d1ab5902bb521071128bafd4f70472ef /spec/presenters/issue_presenter_spec.rb | |
parent | e0bd3a45d9dc6c74cac1a33ea8c03d6d8334249b (diff) | |
download | gitlab-ce-587794b4b8a6e919e77ee4abe8215fa291e6a91d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters/issue_presenter_spec.rb')
-rw-r--r-- | spec/presenters/issue_presenter_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb index 8e24559341b..1eb674d1f8f 100644 --- a/spec/presenters/issue_presenter_spec.rb +++ b/spec/presenters/issue_presenter_spec.rb @@ -17,13 +17,27 @@ describe IssuePresenter do describe '#web_url' do it 'returns correct path' do - expect(presenter.web_url).to eq "http://localhost/#{group.name}/#{project.name}/issues/#{issue.iid}" + expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/issues/#{issue.iid}") + end + end + + describe '#subscribed?' do + subject { presenter.subscribed? } + + it 'returns not subscribed' do + is_expected.to be(false) + end + + it 'returns subscribed' do + create(:subscription, user: user, project: project, subscribable: issue, subscribed: true) + + is_expected.to be(true) end end describe '#issue_path' do it 'returns correct path' do - expect(presenter.issue_path).to eq "/#{group.name}/#{project.name}/issues/#{issue.iid}" + expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/issues/#{issue.iid}") end end end |