diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/presenters/issue_presenter_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/presenters/issue_presenter_spec.rb')
-rw-r--r-- | spec/presenters/issue_presenter_spec.rb | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb index e17ae218cd3..df43b0279dd 100644 --- a/spec/presenters/issue_presenter_spec.rb +++ b/spec/presenters/issue_presenter_spec.rb @@ -26,20 +26,20 @@ RSpec.describe IssuePresenter do context 'when issue type is task' do let(:presented_issue) { task } - context 'when work_items feature flag is enabled' do + context 'when use_iid_in_work_items_path feature flag is disabled' do + before do + stub_feature_flags(use_iid_in_work_items_path: false) + end + it 'returns a work item url for the task' do expect(presenter.web_url).to eq(project_work_items_url(project, work_items_path: presented_issue.id)) end end - context 'when work_items feature flag is disabled' do - before do - stub_feature_flags(work_items: false) - end - - it 'returns an issue url for the task' do - expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/-/issues/#{presented_issue.iid}") - end + it 'returns a work item url using iid for the task' do + expect(presenter.web_url).to eq( + project_work_items_url(project, work_items_path: presented_issue.iid, iid_path: true) + ) end end end @@ -66,20 +66,20 @@ RSpec.describe IssuePresenter do context 'when issue type is task' do let(:presented_issue) { task } - context 'when work_items feature flag is enabled' do + context 'when use_iid_in_work_items_path feature flag is disabled' do + before do + stub_feature_flags(use_iid_in_work_items_path: false) + end + it 'returns a work item path for the task' do expect(presenter.issue_path).to eq(project_work_items_path(project, work_items_path: presented_issue.id)) end end - context 'when work_items feature flag is disabled' do - before do - stub_feature_flags(work_items: false) - end - - it 'returns an issue path for the task' do - expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/-/issues/#{presented_issue.iid}") - end + it 'returns a work item path using iid for the task' do + expect(presenter.issue_path).to eq( + project_work_items_path(project, work_items_path: presented_issue.iid, iid_path: true) + ) end end end |