summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-28 09:52:47 +0200
committerAzul <azul@leap.se>2014-07-31 10:02:38 +0200
commit297b42cd7557a7508cdbf091163da48bbd52a79a (patch)
tree2358174f2e8b13246cd570a6fa2c563392565b39 /test/functional
parent791033d4a3021cc0a476a514667b17a6d519aa89 (diff)
use ApiController#anonymous_access_allowed?
There are some places where we only want to require login unless you can use EIP anonymously. So far we had an anonymous_certs_allowed? method in all these controllers. Now it's replaced with ApiController#anonymous_access_allowed?. The naming better reflects that there might be other services that allow anonymous use at some point. This also fixed a typo name -> @filename that broke the ConfigsController.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/v1/services_controller_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/v1/services_controller_test.rb b/test/functional/v1/services_controller_test.rb
index cde7d9f..039eb27 100644
--- a/test/functional/v1/services_controller_test.rb
+++ b/test/functional/v1/services_controller_test.rb
@@ -4,9 +4,8 @@ class V1::ServicesControllerTest < ActionController::TestCase
test "anonymous user gets login required service info" do
get :show, format: :json
- assert_json_response name: 'anonymous',
- eip_rate_limit: false,
- description: 'please login to access our services'
+ assert_json_response error: 'not_authorized_login',
+ message: 'Please log in to perform that action.'
end
test "anonymous user gets vpn service info" do