summaryrefslogtreecommitdiff
path: root/features/step_definitions/config_steps.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-07-21 10:36:22 +0200
committerazul <azul@leap.se>2014-07-21 10:36:22 +0200
commit791033d4a3021cc0a476a514667b17a6d519aa89 (patch)
tree650d0dff3c8f4ee77efdd237087df7c10b60cf8c /features/step_definitions/config_steps.rb
parentbbd41c9bfd2cb88a88d7436dd58a8b46a5d10cf1 (diff)
parent11d1efaef622335fe6d45917ce0b50a02e4a24a1 (diff)
Merge pull request #181 from azul/feature/allow_anonymous_config_access
Allow fetching configs if anonymous EIP access is allowed
Diffstat (limited to 'features/step_definitions/config_steps.rb')
-rw-r--r--features/step_definitions/config_steps.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/features/step_definitions/config_steps.rb b/features/step_definitions/config_steps.rb
index 50ae829..70ff1aa 100644
--- a/features/step_definitions/config_steps.rb
+++ b/features/step_definitions/config_steps.rb
@@ -4,3 +4,13 @@ Given /the provider config is:$/ do |config|
@tempfile.close
StaticConfigController::PROVIDER_JSON = @tempfile.path
end
+
+# use with @config tag so the config changes are reverted after the scenario
+Given /^"([^"]*)" is (enabled|disabled|"[^"]") in the config$/ do |key, value|
+ value = case value
+ when 'disabled' then false
+ when 'enabled' then true
+ else value.gsub('"', '')
+ end
+ APP_CONFIG.merge! key => value
+end