test/maestrano/maestrano_test.rb in maestrano-0.7.0 vs test/maestrano/maestrano_test.rb in maestrano-0.8.0

- old
+ new

@@ -8,10 +8,11 @@ 'api.id' => 'app-f54ds4f8', 'api.key' => 'someapikey', 'sso.enabled' => false, + 'sso.slo_enabled' => false, 'sso.init_path' => '/mno/sso/init', 'sso.consume_path' => '/mno/sso/consume', 'sso.creation_mode' => 'real', 'sso.idm' => 'http://idp.mysuperapp.com', @@ -25,10 +26,11 @@ config.api.id = @config['api.id'] config.api.key = @config['api.key'] config.sso.enabled = @config['sso.enabled'] + config.sso.slo_enabled = @config['sso.slo_enabled'] config.sso.idm = @config['sso.idm'] config.sso.init_path = @config['sso.init_path'] config.sso.consume_path = @config['sso.consume_path'] config.sso.creation_mode = @config['sso.creation_mode'] @@ -67,10 +69,15 @@ should "force assign the api.version" do Maestrano.configure { |config| config.api.version = "1245" } assert_equal Maestrano::VERSION, Maestrano.param('api.version') end + should "force slo_enabled to false if sso is disabled" do + Maestrano.configure { |config| config.sso.slo_enabled = true; config.sso.enabled = false } + assert_false Maestrano.param('sso.slo_enabled') + end + context "with environment params" do should "return the right test parameters" do Maestrano.configure { |config| config.environment = 'test' } ['api.host','api.base','sso.idp', 'sso.name_id_format', 'sso.x509_certificate'].each do |parameter| @@ -219,9 +226,10 @@ 'base' => Maestrano::Configuration::EVT_CONFIG[@config['environment']]['api.base'], }, 'sso' => { 'enabled' => @config['sso.enabled'], + 'slo_enabled' => @config['sso.slo_enabled'], 'init_path' => @config['sso.init_path'], 'consume_path' => @config['sso.consume_path'], 'creation_mode' => @config['sso.creation_mode'], 'idm' => @config['sso.idm'], 'idp' => Maestrano::Configuration::EVT_CONFIG[@config['environment']]['sso.idp'], \ No newline at end of file