+ assert_select "status[database=online]", :count => 1
+ assert_select "status[api=online]", :count => 1
+ assert_select "status[gpx=online]", :count => 1
+ end
+ end
+ end
+
+ def test_permissions_anonymous
+ get :permissions
+ assert_response :success
+ assert_select "osm > permissions", :count => 1 do
+ assert_select "permission", :count => 0
+ end
+ end
+
+ def test_permissions_basic_auth
+ basic_authorization(users(:normal_user).email, "test")
+ get :permissions
+ assert_response :success
+ assert_select "osm > permissions", :count => 1 do
+ assert_select "permission", :count => ClientApplication.all_permissions.size
+ ClientApplication.all_permissions.each do |p|
+ assert_select "permission[name=#{p}]", :count => 1