* Softrun rubocop * Hardrun rubocop (-A) * Change a rubocop rule * Add missing cops * Undo & redo rubocop -A
13 lines
415 B
Ruby
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
|