From d2f898e7eadc2b4b3d2afb839818c5bc886ce62f Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 27 Apr 2016 14:50:24 -0500 Subject: [PATCH] Fix Todos test --- spec/features/todos/todos_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/todos/todos_spec.rb b/spec/features/todos/todos_spec.rb index 248e004ba6e..3354f529295 100644 --- a/spec/features/todos/todos_spec.rb +++ b/spec/features/todos/todos_spec.rb @@ -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