From b19586148367c576304a2ad74a68b41606a77b3f Mon Sep 17 00:00:00 2001 From: Sage Ross Date: Sat, 15 Jan 2022 10:21:54 -0800 Subject: [PATCH] Fix order-dependent failures in notification_dropdown_view_spec.js These tests were failing because of an error thrown from `this.header.render()`, unless `head_view_spec.js` had already been run to set app.notificationsCollection. --- spec/javascripts/app/views/notification_dropdown_view_spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/javascripts/app/views/notification_dropdown_view_spec.js b/spec/javascripts/app/views/notification_dropdown_view_spec.js index 725ae0d57..50a9de755 100644 --- a/spec/javascripts/app/views/notification_dropdown_view_spec.js +++ b/spec/javascripts/app/views/notification_dropdown_view_spec.js @@ -5,6 +5,7 @@ describe("app.views.NotificationDropdown", function() { this.header = new app.views.Header(); $("header").prepend(this.header.el); loginAs({guid: "foo"}); + app.notificationsCollection = new app.collections.Notifications(); this.header.render(); this.collection = new app.collections.Notifications(); this.view = new app.views.NotificationDropdown({el: "#notification-dropdown", collection: this.collection});