2017-06-08 16:43:05 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Dashboard::MilestonesController do
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { create(:project) }
|
2017-06-08 16:43:05 +00:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:project_milestone) { create(:milestone, project: project) }
|
|
|
|
let(:milestone) do
|
|
|
|
DashboardMilestone.build(
|
|
|
|
[project],
|
|
|
|
project_milestone.title
|
|
|
|
)
|
|
|
|
end
|
|
|
|
let(:issue) { create(:issue, project: project, milestone: project_milestone) }
|
|
|
|
let!(:label) { create(:label, project: project, title: 'Issue Label', issues: [issue]) }
|
|
|
|
let!(:merge_request) { create(:merge_request, source_project: project, target_project: project, milestone: project_milestone) }
|
|
|
|
let(:milestone_path) { dashboard_milestone_path(milestone.safe_title, title: milestone.title) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(user)
|
2018-07-11 14:36:08 +00:00
|
|
|
project.add_maintainer(user)
|
2017-06-08 16:43:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'milestone tabs'
|
|
|
|
|
|
|
|
describe "#show" do
|
|
|
|
render_views
|
|
|
|
|
|
|
|
def view_milestone
|
|
|
|
get :show, id: milestone.safe_title, title: milestone.title
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'shows milestone page' do
|
|
|
|
view_milestone
|
|
|
|
|
2017-10-19 18:28:19 +00:00
|
|
|
expect(response).to have_gitlab_http_status(200)
|
2017-06-08 16:43:05 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|