diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-17 22:47:03 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-17 23:03:15 +0300 |
commit | 6fdf383e60d2a47c13366a9f62481ffc20ab0771 (patch) | |
tree | 49516f20a0e1c125adb6e2147e3bc118529fda9c /spec | |
parent | 4a7ba5114dcd859d998b417010a427b0f1753829 (diff) |
Merge branch 'fix-todos-counters' into 'master'
Ensure Todos counters doesn't count Todos for projects pending delete
Use `TodosFinder` instead of `current_user.todos` to filter projects
pending delete on Todos counters helpers.
Counters should not reflect the number of Todos displayed on the tabs.
Fixes #18633
See merge request !4663
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/todos/todos_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/features/todos/todos_spec.rb b/spec/features/todos/todos_spec.rb index 8e1833a069e..0bdb1628c74 100644 --- a/spec/features/todos/todos_spec.rb +++ b/spec/features/todos/todos_spec.rb @@ -103,11 +103,15 @@ describe 'Dashboard Todos', feature: true do before do deleted_project = create(:project, visibility_level: Gitlab::VisibilityLevel::PUBLIC, pending_delete: true) create(:todo, :mentioned, user: user, project: deleted_project, target: issue, author: author) + create(:todo, :mentioned, user: user, project: deleted_project, target: issue, author: author, state: :done) login_as(user) visit dashboard_todos_path end it 'shows "All done" message' do + within('.todos-pending-count') { expect(page).to have_content '0' } + expect(page).to have_content 'To do 0' + expect(page).to have_content 'Done 0' expect(page).to have_content "You're all done!" end end |