From 5da01b92c563e412fe67962a5cea90bc54df5507 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 16 May 2018 12:59:16 +0800 Subject: [PATCH] Fix test which was accidentally testing as the entry user twice --- test/controllers/diary_entry_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllers/diary_entry_controller_test.rb b/test/controllers/diary_entry_controller_test.rb index f95c57d7c..ee74c4263 100644 --- a/test/controllers/diary_entry_controller_test.rb +++ b/test/controllers/diary_entry_controller_test.rb @@ -335,7 +335,7 @@ class DiaryEntryControllerTest < ActionController::TestCase # and when not logged in as the user who wrote the entry get :view, :params => { :display_name => entry.user.display_name, :id => entry.id }, - :session => { :user => entry.user } + :session => { :user => create(:user) } assert_response :success assert_template "diary_entry/view" assert_select "title", :text => /Users' diaries | /, :count => 1 -- 2.43.2