diff options
author | Stan Hu <stanhu@gmail.com> | 2015-12-04 22:56:10 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-12-05 00:04:44 -0800 |
commit | 4fab178850f512ad15715b6f723ace6fce7882fc (patch) | |
tree | 34de3a9e088c9870df0e84a3afe1e0fbae62ba4a | |
parent | d800a949d2d5497e8aff3ae28ec8520e5b99cdb8 (diff) | |
download | gitlab-ce-4fab178850f512ad15715b6f723ace6fce7882fc.tar.gz |
Fix spec that broke due to fact that iid is needed, not id, for MilestonesController
-rw-r--r-- | spec/controllers/projects/milestones_controller_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index 8127efabe6e..d173bb350f1 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -5,7 +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(:merge_request) { create(:merge_request, source_project: project, target_project: project, milestone: milestone) } + let!(:merge_request) { create(:merge_request, source_project: project, target_project: project, milestone: milestone) } before do sign_in(user) @@ -15,10 +15,9 @@ describe Projects::MilestonesController do describe "#destroy" do it "should remove milestone" do - merge_request.reload expect(issue.milestone_id).to eq(milestone.id) - delete :destroy, namespace_id: project.namespace.id, project_id: project.id, id: milestone.id, format: :js + delete :destroy, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid, format: :js expect(response).to be_success expect(Event.first.action).to eq(Event::DESTROYED) |