Skip to content

Commit

Permalink
fix installed_identities tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitinspace committed Oct 16, 2023
1 parent d3571f3 commit 4aedf33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fastlane_core/spec/cert_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ProcessStatusMock

describe '#installed_identies' do
it 'should print an error when no local code signing identities are found' do
allow(FastlaneCore::CertChecker).to receive(:wwdr_keychain).and_return('login.keychain')
allow(FastlaneCore::CertChecker).to receive(:installed_wwdr_certificates).and_return(['G2', 'G3', 'G4', 'G5', 'G6'])
allow(FastlaneCore::CertChecker).to receive(:list_available_identities).and_return(" 0 valid identities found\n")
expect(FastlaneCore::UI).to receive(:error).with(/There are no local code signing identities found/)
Expand All @@ -19,6 +20,7 @@ class ProcessStatusMock
end

it 'should not be fooled by 10 local code signing identities available' do
allow(FastlaneCore::CertChecker).to receive(:wwdr_keychain).and_return('login.keychain')
allow(FastlaneCore::CertChecker).to receive(:installed_wwdr_certificates).and_return(['G2', 'G3', 'G4', 'G5', 'G6'])
allow(FastlaneCore::CertChecker).to receive(:list_available_identities).and_return(" 10 valid identities found\n")
expect(FastlaneCore::UI).not_to(receive(:error))
Expand Down

0 comments on commit 4aedf33

Please sign in to comment.