let!(:closed_milestone){create(:closed_milestone,project: project,title: 'version1',description: 'closed milestone')}let!(:milestone){create(:milestone,project: project,title: 'version2',description: 'open milestone')}beforedoproject.team<<[user,:developer]endit_behaves_like'group and project milestones',"/projects/:id/milestones"dolet(:route){"/projects/#{project.id}/milestones"}enddescribe'PUT /projects/:id/milestones/:milestone_id to test observer on close'doit'creates an activity event when an milestone is closed'doexpect(Event).toreceive(:create)putapi("/projects/#{project.id}/milestones/#{milestone.id}",user),state_event: 'close'endendend