Sha256: 0da16b87204f78443a2b7c1884b59dd03df9fadf32f6123e06133001130aa059

Contents?: true

Size: 499 Bytes

Versions: 5

Compression:

Stored size: 499 Bytes

Contents

require 'test_helper'

class DummyMethod < SSO::Base
  def initialize(*args)
  end
end

class DummyTrueMethod < DummyMethod
  def available?
    true
  end
end

class DummyFalseMethod < DummyMethod
  def available?
    false
  end
end

class SSOTest < ActiveSupport::TestCase
  def test_get_available_should_find_first_available_method
    stub(SSO).all { [ DummyFalseMethod, DummyTrueMethod, DummyFalseMethod ] }
    available = SSO.get_available(Object.new)
    assert_present available
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/test/unit/sso.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/test/unit/sso.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/test/unit/sso.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/test/unit/sso.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/test/unit/sso.rb