Welcome to mirror list, hosted at ThFree Co, Russian Federation.

work_items_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4e1eca3d41177afa3ef8ce8cb0907a7cd3d08257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require "spec_helper"

RSpec.describe WorkItemsHelper, feature_category: :team_planning do
  describe '#work_items_index_data' do
    subject(:work_items_index_data) { helper.work_items_index_data(project) }

    let_it_be(:project) { build(:project) }

    it 'returns the expected data properties' do
      expect(work_items_index_data).to include(
        {
          full_path: project.full_path,
          issues_list_path: project_issues_path(project),
          register_path: new_user_registration_path(redirect_to_referer: 'yes'),
          sign_in_path: user_session_path(redirect_to_referer: 'yes'),
          new_comment_template_path: profile_comment_templates_path,
          report_abuse_path: add_category_abuse_reports_path
        }
      )
    end
  end
end