gitlab-org--gitlab-foss/spec/views/shared/milestones/_top.html.haml_spec.rb

23 lines
644 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-03-05 06:11:51 -05:00
require 'spec_helper'
RSpec.describe 'shared/milestones/_top.html.haml' do
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