diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/features/dashboard/todos/todos_spec.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/features/dashboard/todos/todos_spec.rb')
-rw-r--r-- | spec/features/dashboard/todos/todos_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index adb43d60306..e02cd182b2c 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -60,6 +60,21 @@ RSpec.describe 'Dashboard Todos' do end end + context 'when todo references an issue of type task' do + let(:task) { create(:issue, :task, project: project) } + let!(:task_todo) { create(:todo, :mentioned, user: user, project: project, target: task, author: author) } + + before do + sign_in(user) + + visit dashboard_todos_path + end + + it 'displays the correct issue type name' do + expect(page).to have_content('mentioned you on task') + end + end + context 'user has an unauthorized todo' do before do sign_in(user) @@ -85,6 +100,10 @@ RSpec.describe 'Dashboard Todos' do visit dashboard_todos_path end + it 'displays the correct issue type name' do + expect(page).to have_content('mentioned you on issue') + end + it 'has todo present' do expect(page).to have_selector('.todos-list .todo', count: 1) end |