2019-07-25 05:24:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 07:56:52 +00:00
|
|
|
require 'spec_helper'
|
2018-09-04 17:31:16 +00:00
|
|
|
|
2020-06-16 18:09:01 +00:00
|
|
|
RSpec.describe 'New merge request breadcrumb' do
|
2018-09-05 09:39:42 +00:00
|
|
|
let(:project) { create(:project, :repository) }
|
2018-11-28 19:15:37 +00:00
|
|
|
let(:user) { project.creator }
|
2018-09-04 17:31:16 +00:00
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
2018-11-28 19:15:37 +00:00
|
|
|
visit(project_new_merge_request_path(project))
|
2018-09-04 17:31:16 +00:00
|
|
|
end
|
|
|
|
|
2018-11-28 19:15:37 +00:00
|
|
|
it 'displays link to project merge requests and new merge request' do
|
2018-09-04 17:31:16 +00:00
|
|
|
page.within '.breadcrumbs' do
|
2021-03-30 15:11:08 +00:00
|
|
|
expect(find_link('Merge requests')[:href]).to end_with(project_merge_requests_path(project))
|
2018-09-04 17:31:16 +00:00
|
|
|
expect(find_link('New')[:href]).to end_with(project_new_merge_request_path(project))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|