test/lib/testhelper/auth.rb
def unlock_keychain
      return true unless Keychain.default.locked?
      unlocked = prompt_for_password prompt: 'Enter your keychain password' do |pw|
        begin
          Keychain.default.unlock! pw
          true
        rescue Keychain::AuthFailedError
          false
        end # begin
      end # prompt for pass
      raise JSS::AuthenticationError, 'Failed to unlock default keychain' unless unlocked
    end
# Prompt the user to unlock the default keychain
#
# @return [void]
#
Prompt the user to unlock the default keychain
Prompt the user to unlock the default keychain
def unlock_keychain
      return true unless Keychain.default.locked?
      unlocked = prompt_for_password prompt: 'Enter your keychain password' do |pw|
        begin
          Keychain.default.unlock! pw
          true
        rescue Keychain::AuthFailedError
          false
        end 
      end 
      raise JSS::AuthenticationError, 'Failed to unlock default keychain' unless unlocked
    end
def unlock_keychain return true unless Keychain . default . locked? unlocked = prompt_for_password prompt : 'Enter your keychain password' do | pw | begin Keychain . default . unlock! pw true rescue Keychain :: AuthFailedError false end end raise JSS :: AuthenticationError , 'Failed to unlock default keychain' unless unlocked end
Prompt the user to unlock the default keychain
Prompt the user to unlock the default keychain
# begin # prompt for pass
None
void