From de25e989db2957f00d15f0a6a91fc252beb214ec Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Sat, 5 Sep 2020 03:51:50 +0300 Subject: [PATCH] Fix the last test failing on PgSQL by making sure we're editing an active todo when testing notes --- test/controllers/todos_controller_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/controllers/todos_controller_test.rb b/test/controllers/todos_controller_test.rb index 70983854..3fa3b774 100644 --- a/test/controllers/todos_controller_test.rb +++ b/test/controllers/todos_controller_test.rb @@ -480,7 +480,6 @@ class TodosControllerTest < ActionController::TestCase login_as(:admin_user) get :index, params: { :format => "rss" } assert_equal 'application/rss+xml', @response.media_type - # puts @response.body assert_select 'rss[version="2.0"]' do assert_select 'channel' do @@ -996,7 +995,7 @@ class TodosControllerTest < ActionController::TestCase def test_format_note login_as(:admin_user) - todo = users(:admin_user).todos.first + todo = users(:admin_user).todos.where("state='active'").first todo.notes = "Normal *bold* http://foo.bar/baz" todo.save! get :index