2019-07-25 05:24:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 07:56:52 +00:00
|
|
|
require 'spec_helper'
|
2017-02-02 09:31:09 +00:00
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe 'Group label on issue' do
|
2020-09-17 15:09:24 +00:00
|
|
|
it 'renders link to the project issues page', :js do
|
2017-02-02 09:31:09 +00:00
|
|
|
group = create(:group)
|
2017-08-02 19:55:11 +00:00
|
|
|
project = create(:project, :public, namespace: group)
|
2017-02-02 09:31:09 +00:00
|
|
|
feature = create(:group_label, group: group, title: 'feature')
|
|
|
|
issue = create(:labeled_issue, project: project, labels: [feature])
|
2017-06-29 17:06:35 +00:00
|
|
|
label_link = project_issues_path(project, label_name: [feature.name])
|
2017-02-02 09:31:09 +00:00
|
|
|
|
2017-06-29 17:06:35 +00:00
|
|
|
visit project_issue_path(project, issue)
|
2017-02-02 09:31:09 +00:00
|
|
|
|
|
|
|
link = find('.issuable-show-labels a')
|
|
|
|
|
2020-09-17 15:09:24 +00:00
|
|
|
expect(CGI.unescape(link[:href])).to include(CGI.unescape(label_link))
|
2017-02-02 09:31:09 +00:00
|
|
|
end
|
|
|
|
end
|