From d10888bfa5c059d5ce1eab67d0dcc4b10a02c20b Mon Sep 17 00:00:00 2001 From: Michael Kohl Date: Tue, 12 May 2020 18:20:05 +0700 Subject: [PATCH] Fix flaky organization helper spec (#7785) --- spec/helpers/organization_helper_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/helpers/organization_helper_spec.rb b/spec/helpers/organization_helper_spec.rb index b080607d4..62b337386 100644 --- a/spec/helpers/organization_helper_spec.rb +++ b/spec/helpers/organization_helper_spec.rb @@ -1,13 +1,13 @@ require "rails_helper" describe OrganizationHelper, type: :helper do - it "display the correct options" do - org1 = create(:organization) - org2 = create(:organization) + it "displays the correct options" do + org1 = create(:organization, name: "ACME") + org2 = create(:organization, name: "Pied Piper") allow(org1).to receive(:unspent_credits_count).and_return(1) options = helper.orgs_with_credits([org1, org2]) - expect(options).to include("#{org1.name} (1)") - expect(options).to include("#{org2.name} (0)") + expect(options).to include("ACME (1)") + expect(options).to include("Pied Piper (0)") end end