summaryrefslogtreecommitdiff
path: root/spec/features/issues_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r--spec/features/issues_spec.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb
index f6fb6a72d22..65fe918e2e8 100644
--- a/spec/features/issues_spec.rb
+++ b/spec/features/issues_spec.rb
@@ -396,6 +396,27 @@ describe 'Issues', feature: true do
expect(page).to have_content @user.name
end
end
+
+ it 'allows user to unselect themselves', js: true do
+ issue2 = create(:issue, project: project, author: @user)
+ visit namespace_project_issue_path(project.namespace, project, issue2)
+
+ page.within '.assignee' do
+ click_link 'Edit'
+ click_link @user.name
+
+ page.within '.value' do
+ expect(page).to have_content @user.name
+ end
+
+ click_link 'Edit'
+ click_link @user.name
+
+ page.within '.value' do
+ expect(page).to have_content "No assignee"
+ end
+ end
+ end
end
context 'by unauthorized user' do
@@ -440,6 +461,26 @@ describe 'Issues', feature: true do
expect(issue.reload.milestone).to be_nil
end
+
+ it 'allows user to de-select milestone', js: true do
+ visit namespace_project_issue_path(project.namespace, project, issue)
+
+ page.within('.milestone') do
+ click_link 'Edit'
+ click_link milestone.title
+
+ page.within '.value' do
+ expect(page).to have_content milestone.title
+ end
+
+ click_link 'Edit'
+ click_link milestone.title
+
+ page.within '.value' do
+ expect(page).to have_content 'None'
+ end
+ end
+ end
end
context 'by unauthorized user' do