test/maestrano/maestrano_test.rb in maestrano-0.9.2 vs test/maestrano/maestrano_test.rb in maestrano-0.10.0

- old
+ new

@@ -14,12 +14,14 @@ 'sso.init_path' => '/mno/sso/init', 'sso.consume_path' => '/mno/sso/consume', 'sso.creation_mode' => 'real', 'sso.idm' => 'http://idp.mysuperapp.com', - 'webhook.account.groups_path' => '/mno/groups/:id', - 'webhook.account.group_users_path' => '/mno/groups/:group_id/users/:id', + 'webhook.account.groups_path' => '/mno/groups/:id', + 'webhook.account.group_users_path' => '/mno/groups/:group_id/users/:id', + 'webhook.connec.notifications_path' => 'mno/receive', + 'webhook.connec.subscriptions' => { organizations: true, people: true } } Maestrano.configure do |config| config.environment = @config['environment'] config.app.host = @config['app.host'] @@ -32,12 +34,15 @@ 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'] - config.webhook.account.groups_path = @config['webhook.account.groups_path' ] - config.webhook.account.group_users_path = @config['webhook.account.group_users_path' ] + config.webhook.account.groups_path = @config['webhook.account.groups_path'] + config.webhook.account.group_users_path = @config['webhook.account.group_users_path'] + + config.webhook.connec.notifications_path = @config['webhook.connec.notifications_path'] + config.webhook.connec.subscriptions = @config['webhook.connec.subscriptions'] end end context "new style configuration" do should "return the specified parameters" do @@ -85,19 +90,19 @@ 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| + ['api.host','api.base','sso.idp', 'sso.name_id_format', 'sso.x509_certificate', 'connec.host','connec.base_path'].each do |parameter| assert_equal Maestrano::Configuration::EVT_CONFIG['test'][parameter], Maestrano.param(parameter) end end should "return the right production parameters" do Maestrano.configure { |config| config.environment = 'production' } - ['api.host','api.base','sso.idp', 'sso.name_id_format', 'sso.x509_certificate'].each do |parameter| + ['api.host','api.base','sso.idp', 'sso.name_id_format', 'sso.x509_certificate','connec.host','connec.base_path'].each do |parameter| assert_equal Maestrano::Configuration::EVT_CONFIG['production'][parameter], Maestrano.param(parameter) end end end end @@ -247,9 +252,13 @@ }, 'webhook' => { 'account' => { 'groups_path' => @config['webhook.account.groups_path'], 'group_users_path' => @config['webhook.account.group_users_path'], + }, + 'connec' => { + 'notifications_path' => 'mno/receive', + 'subscriptions' => { organizations: true, people: true } } } } assert_equal expected, Maestrano.to_metadata \ No newline at end of file