Fix flaky organization helper spec (#7785)
This commit is contained in:
parent
d60fee2196
commit
d10888bfa5
1 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue