diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2016-08-30 22:20:31 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2016-08-31 18:27:04 +0300 |
commit | 632899826bbb4d50f8c003b2c1771fa17d89d022 (patch) | |
tree | 7a433055f3bfd8b751996c33ea0cf9a8d5269522 /spec/features/todos | |
parent | 51087cfa1a6b0bb5a7abf35081ed3b669253eb4f (diff) |
Fix bug where pagination is still displayed despite all todos marked as done
Diffstat (limited to 'spec/features/todos')
-rw-r--r-- | spec/features/todos/todos_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/todos/todos_spec.rb b/spec/features/todos/todos_spec.rb index 32544f3f538..fc555a74f30 100644 --- a/spec/features/todos/todos_spec.rb +++ b/spec/features/todos/todos_spec.rb @@ -118,6 +118,20 @@ describe 'Dashboard Todos', feature: true do expect(page).to have_css("#todo_#{Todo.first.id}") end end + + describe 'mark all as done', js: true do + before do + visit dashboard_todos_path + click_link('Mark all as done') + 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 "You're all done!" + expect(page).not_to have_selector('.gl-pagination') + end + end end context 'User has a Todo in a project pending deletion' do |