Skip to content
Snippets Groups Projects
Commit d2f898e7 authored by Alfredo Sumaran's avatar Alfredo Sumaran
Browse files

Fix Todos test

parent 2ec58d4a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment