2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe 'shared/milestones/_top.html.haml' do
|
2020-04-08 14:13:33 +05:30
|
|
|
let_it_be(:group) { create(:group) }
|
2021-09-30 23:02:18 +05:30
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
let(:project) { create(:project, group: group) }
|
|
|
|
let(:milestone) { create(:milestone, project: project) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
allow(milestone).to receive(:milestones) { [] }
|
2019-10-12 21:52:04 +05:30
|
|
|
allow(milestone).to receive(:milestone) { milestone }
|
2018-10-15 14:42:47 +05:30
|
|
|
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
|