Sha256: ee4043d97ef67202867e84875e5169e1f8ea082d42a56fa04ff47581030d5411
Contents?: true
Size: 827 Bytes
Versions: 7
Compression:
Stored size: 827 Bytes
Contents
require 'test_helper' require 'mocha/setup' class BindingsTest < ActiveSupport::TestCase def setup KatelloForemanEngine::Settings.initialize_settings end test 'client lib setting' do KatelloForemanEngine::Settings['foreman_url'] = 'https://example.com/foreman' KatelloForemanEngine::Settings['oauth_consumer_key'] = 'key' KatelloForemanEngine::Settings['oauth_consumer_secret'] = 'secret' User.current = User.new(:username => 'test') env_resource = KatelloForemanEngine::Bindings.environment config = env_resource.config assert_equal 'https://example.com/foreman', config[:base_url] assert_equal 'key', config[:oauth][:consumer_key] assert_equal 'secret', config[:oauth][:consumer_secret] assert_equal 'test', env_resource.client.options[:headers][:foreman_user] end end
Version data entries
7 entries across 7 versions & 1 rubygems