From 866894563eef54ca744179c15af302d2a7b5f53f Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 20 Aug 2022 17:14:51 +0200 Subject: [PATCH] Apply review suggestions from @nilsding Co-authored-by: Georg Gadinger --- spec/controllers/user_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index a8a62882..11599f0a 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -61,7 +61,7 @@ describe UserController, type: :controller do expect(response).to render_template("user/questions") end - context "current user signed in" do + context "when the current user is the question author" do before do sign_in user end @@ -72,7 +72,7 @@ describe UserController, type: :controller do end end - context "user signed in" do + context "when the current user is someone else" do let(:another_user) { FactoryBot.create :user } before do @@ -85,7 +85,7 @@ describe UserController, type: :controller do end end - context "moderator unmasked" do + context "when a moderator uses unmask" do let(:another_user) { FactoryBot.create :user, roles: ["moderator"] } before do @@ -99,7 +99,7 @@ describe UserController, type: :controller do end end - context "user not signed in" do + context "when user is not signed in" do it "contains no questions" do subject expect(assigns(:questions).size).to eq(0)