docbrown/spec/helpers/organization_helper_spec.rb
Mac Siri 842e6880b8
Routine rubocop fix on /spec (#19217)
* Softrun rubocop

* Hardrun rubocop (-A)

* Change a rubocop rule

* Add missing cops

* Undo & redo rubocop -A
2023-03-21 09:55:26 -04:00

13 lines
415 B
Ruby

require "rails_helper"
describe OrganizationHelper do
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("ACME (1)")
expect(options).to include("Pied Piper (0)")
end
end