diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/features/dashboard/todos/todos_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/features/dashboard/todos/todos_spec.rb')
-rw-r--r-- | spec/features/dashboard/todos/todos_spec.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index 7345bfa19e2..b00bdeac3b9 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -5,10 +5,11 @@ require 'spec_helper' RSpec.describe 'Dashboard Todos' do include DesignManagementTestHelpers - let_it_be(:user) { create(:user, username: 'john') } - let_it_be(:author) { create(:user) } + let_it_be(:user) { create(:user, username: 'john') } + let_it_be(:user2) { create(:user, username: 'diane') } + let_it_be(:author) { create(:user) } let_it_be(:project) { create(:project, :public) } - let_it_be(:issue) { create(:issue, project: project, due_date: Date.today, title: "Fix bug") } + let_it_be(:issue) { create(:issue, project: project, due_date: Date.today, title: "Fix bug") } before_all do project.add_developer(user) @@ -23,6 +24,19 @@ RSpec.describe 'Dashboard Todos' do it 'shows "All done" message' do expect(page).to have_content 'Your To-Do List shows what to work on next' end + + context 'when user was assigned to an issue and marked it as done' do + before do + sign_in(user) + end + + it 'shows "Are you looking for things to do?" message' do + create(:todo, :assigned, :done, user: user, project: project, target: issue, author: user2) + visit dashboard_todos_path + + expect(page).to have_content 'Are you looking for things to do? Take a look at open issues, contribute to a merge request, or mention someone in a comment to automatically assign them a new to-do item.' + end + end end context 'when the todo references a merge request' do |