diff options
author | Azul <azul@leap.se> | 2014-04-18 12:51:18 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-04-18 13:08:45 +0200 |
commit | be81b7430e0a2046125be7c3a4b01b8725f4afe6 (patch) | |
tree | e14ea6e4d3e9b9c925f5ae99223635973a2710c7 | |
parent | 966e390d401b84dad98127e647d2ec634f1cbc15 (diff) |
adopt service_level config to platform settings
cost -> rate
quota -> storage
-rw-r--r-- | app/models/anonymous_service_level.rb | 1 | ||||
-rw-r--r-- | config/defaults.yml | 5 | ||||
-rw-r--r-- | test/functional/v1/services_controller_test.rb | 9 |
3 files changed, 5 insertions, 10 deletions
diff --git a/app/models/anonymous_service_level.rb b/app/models/anonymous_service_level.rb index 47b7cfb..4366a4a 100644 --- a/app/models/anonymous_service_level.rb +++ b/app/models/anonymous_service_level.rb @@ -23,7 +23,6 @@ class AnonymousServiceLevel def config_hash { name: "anonymous", description: description, - cost: 0, eip_rate_limit: APP_CONFIG[:allow_limited_certs] } end diff --git a/config/defaults.yml b/config/defaults.yml index a7b70a3..47cb641 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -52,13 +52,12 @@ service_levels: &service_levels 1: name: free description: "free account, with rate limited VPN" - cost: 0 eip_rate_limit: true - quota: 100 + storage: 100 2: name: premium description: "premium account, with unlimited vpn" - cost: + rate: USD: 10 EUR: 10 default_service_level: 1 diff --git a/test/functional/v1/services_controller_test.rb b/test/functional/v1/services_controller_test.rb index b81103f..e4058c0 100644 --- a/test/functional/v1/services_controller_test.rb +++ b/test/functional/v1/services_controller_test.rb @@ -6,8 +6,7 @@ class V1::ServicesControllerTest < ActionController::TestCase get :show, format: :json assert_json_response name: 'anonymous', eip_rate_limit: false, - description: 'please login to access our services', - cost: 0 + description: 'please login to access our services' end test "anonymous user gets vpn service info" do @@ -15,8 +14,7 @@ class V1::ServicesControllerTest < ActionController::TestCase get :show, format: :json assert_json_response name: 'anonymous', eip_rate_limit: false, - description: 'anonymous access to the VPN', - cost: 0 + description: 'anonymous access to the VPN' end end @@ -26,8 +24,7 @@ class V1::ServicesControllerTest < ActionController::TestCase assert_json_response name: 'free', eip_rate_limit: true, description: 'free account, with rate limited VPN', - cost: 0, - quota: 100 + storage: 100 end end |