From 2b352b86ae346388c2a228e79f513d515bea593e Mon Sep 17 00:00:00 2001 From: Sage Ross Date: Sat, 15 Jan 2022 12:47:28 -0800 Subject: [PATCH] Fix order-dependent failures in comment_view_spec.js It looks like these specs expect a logged-in user, and would fail when run after a test that logged out. --- spec/javascripts/app/views/comment_view_spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/javascripts/app/views/comment_view_spec.js b/spec/javascripts/app/views/comment_view_spec.js index fc5a633cf..769e0e342 100644 --- a/spec/javascripts/app/views/comment_view_spec.js +++ b/spec/javascripts/app/views/comment_view_spec.js @@ -47,6 +47,10 @@ describe("app.views.Comment", function(){ }); describe("canRemove", function(){ + beforeEach(function(){ + loginAs({name:'alice'}); + }); + context("is truthy", function(){ it("when ownComment is true", function(){ spyOn(this.view, "ownComment").and.returnValue(true);