From 117ce24ac3be25422ce3c797235e5d9235da85cf Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 22 Aug 2017 13:56:29 -0400 Subject: [PATCH] Correct a flaky spec --- spec/controllers/uploads_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index 1f2ff234bd7..03e0716bf26 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -41,7 +41,7 @@ describe UploadsController do message = MessageBus.track_publish do xhr :post, :create, file: logo, type: "avatar" - end.first + end.find { |m| m.channel == "/uploads/avatar" } expect(response.status).to eq 200 @@ -56,7 +56,7 @@ describe UploadsController do message = MessageBus.track_publish do xhr :post, :create, file: text_file, type: "composer" - end.first + end.find { |m| m.channel == "/uploads/composer" } expect(response.status).to eq 200 expect(message.channel).to eq("/uploads/composer")