diff options
Diffstat (limited to 'spec/helpers/issues_helper_spec.rb')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 2f57657736d..a85b1bd0a48 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -265,7 +265,7 @@ RSpec.describe IssuesHelper do is_issue_author: 'false', issue_path: issue_path(issue), issue_type: 'issue', - new_issue_path: new_project_issue_path(project, { issue: { description: "Related to \##{issue.iid}.\n\n" } }), + new_issue_path: new_project_issue_path(project, { add_related_issue: issue.iid }), project_path: project.full_path, report_abuse_path: new_abuse_report_path(user_id: issue.author.id, ref_url: issue_url(issue)), submit_as_spam_path: mark_as_spam_project_issue_path(project, issue) @@ -277,9 +277,7 @@ RSpec.describe IssuesHelper do shared_examples 'issues list data' do it 'returns expected result' do - finder = double.as_null_object allow(helper).to receive(:current_user).and_return(current_user) - allow(helper).to receive(:finder).and_return(finder) allow(helper).to receive(:can?).and_return(true) allow(helper).to receive(:image_path).and_return('#') allow(helper).to receive(:import_csv_namespace_project_issues_path).and_return('#') @@ -308,7 +306,7 @@ RSpec.describe IssuesHelper do jira_integration_path: help_page_url('integration/jira/issues', anchor: 'view-jira-issues'), markdown_help_path: help_page_path('user/markdown'), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes), - new_issue_path: new_project_issue_path(project, issue: { milestone_id: finder.milestones.first.id }), + new_issue_path: new_project_issue_path(project), project_import_jira_path: project_import_jira_path(project), quick_actions_help_path: help_page_path('user/project/quick_actions'), releases_path: project_releases_path(project, format: :json), @@ -318,7 +316,7 @@ RSpec.describe IssuesHelper do sign_in_path: new_user_session_path } - expect(helper.project_issues_list_data(project, current_user, finder)).to include(expected) + expect(helper.project_issues_list_data(project, current_user)).to include(expected) end end |