Commit d2f898e7 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix Todos test

parent 2ec58d4a
......@@ -68,12 +68,12 @@ describe 'Dashboard Todos', feature: true do
describe 'completing last todo from last page', js: true do
it 'redirects to the previous page' do
visit dashboard_todos_path(page: 2)
expect(page).to have_content(Todo.first.body)
expect(page).to have_css("#todo_#{Todo.last.id}")
click_link('Done')
expect(current_path).to eq dashboard_todos_path
expect(page).to have_content(Todo.last.body)
expect(page).to have_css("#todo_#{Todo.first.id}")
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment