diff options
Diffstat (limited to 'spec/features/milestones/user_deletes_milestone_spec.rb')
-rw-r--r-- | spec/features/milestones/user_deletes_milestone_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/milestones/user_deletes_milestone_spec.rb b/spec/features/milestones/user_deletes_milestone_spec.rb new file mode 100644 index 00000000000..414702daba4 --- /dev/null +++ b/spec/features/milestones/user_deletes_milestone_spec.rb @@ -0,0 +1,25 @@ +require "rails_helper" + +describe "User deletes milestone", :js do + set(:user) { create(:user) } + set(:project) { create(:project) } + set(:milestone) { create(:milestone, project: project) } + + before do + project.add_developer(user) + sign_in(user) + + visit(project_milestones_path(project)) + end + + it "deletes milestone" do + click_button("Delete") + click_button("Delete milestone") + + expect(page).to have_content("No milestones to show") + + visit(activity_project_path(project)) + + expect(page).to have_content("#{user.name} destroyed milestone") + end +end |