2019-10-08 08:06:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-05 06:11:51 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 11:08:50 -04:00
|
|
|
RSpec.describe 'shared/milestones/_top.html.haml' do
|
2020-02-24 22:08:49 -05:00
|
|
|
let_it_be(:group) { create(:group) }
|
2018-03-05 06:11:51 -05:00
|
|
|
let(:project) { create(:project, group: group) }
|
|
|
|
let(:milestone) { create(:milestone, project: project) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
allow(milestone).to receive(:milestones) { [] }
|
2019-07-30 08:39:33 -04:00
|
|
|
allow(milestone).to receive(:milestone) { milestone }
|
2018-03-05 06:11:51 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'does not render a deprecation message for a non-legacy and non-dashboard milestone' do
|
|
|
|
assign :group, group
|
|
|
|
|
|
|
|
render 'shared/milestones/top', milestone: milestone
|
|
|
|
|
|
|
|
expect(rendered).not_to have_css('.milestone-deprecation-message')
|
|
|
|
end
|
|
|
|
end
|