Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/dashboard/todos/todos_spec.rb')
-rw-r--r--spec/features/dashboard/todos/todos_spec.rb20
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