diff options
author | Stan Hu <stanhu@gmail.com> | 2017-04-24 08:58:15 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-04-24 09:33:12 -0700 |
commit | 68bb2a53383d79e5e3e38f9894f0ea61c3701f46 (patch) | |
tree | 4ef407cf2d8e4e8364cf094e216f3ea9c7cf2f9a /spec/controllers | |
parent | bbcb7e5e96b030b4b2a3d03ee9c715853e6528be (diff) | |
download | gitlab-ce-68bb2a53383d79e5e3e38f9894f0ea61c3701f46.tar.gz |
Optimize project namespace lookup for milestones and add specssh-optimize-milestone-polymorphic-url
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/milestones_controller_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index 14207bf6b7a..47e61c3cea8 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -5,6 +5,7 @@ describe Projects::MilestonesController do let(:user) { create(:user) } let(:milestone) { create(:milestone, project: project) } let(:issue) { create(:issue, project: project, milestone: 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: milestone) } before do @@ -13,6 +14,20 @@ describe Projects::MilestonesController do controller.instance_variable_set(:@project, project) end + describe "#show" do + render_views + + def view_milestone + get :show, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid + end + + it 'shows milestone page' do + view_milestone + + expect(response).to have_http_status(200) + end + end + describe "#destroy" do it "removes milestone" do expect(issue.milestone_id).to eq(milestone.id) |