X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbbbd62ef1982e905ceb23f1278e9b4bfdb49d5b..f1c6a87aa137c11d0aff5a4b0e563ac2c2a8f82d:/test/abilities/api_capability_test.rb diff --git a/test/abilities/api_capability_test.rb b/test/abilities/api_capability_test.rb index 8d0e682f6..8a98f29e0 100644 --- a/test/abilities/api_capability_test.rb +++ b/test/abilities/api_capability_test.rb @@ -100,33 +100,33 @@ class UserApiCapabilityTest < ApiCapabilityTest test "user preferences" do # a user with no tokens capability = ApiCapability.new nil - [:read, :read_one, :update, :update_one, :delete_one].each do |act| + [:index, :show, :update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end # A user with empty tokens capability = ApiCapability.new tokens - [:read, :read_one, :update, :update_one, :delete_one].each do |act| + [:index, :show, :update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end capability = ApiCapability.new tokens(:allow_read_prefs) - [:update, :update_one, :delete_one].each do |act| + [:update_all, :update, :destroy].each do |act| assert capability.cannot? act, UserPreference end - [:read, :read_one].each do |act| + [:index, :show].each do |act| assert capability.can? act, UserPreference end capability = ApiCapability.new tokens(:allow_write_prefs) - [:read, :read_one].each do |act| + [:index, :show].each do |act| assert capability.cannot? act, UserPreference end - [:update, :update_one, :delete_one].each do |act| + [:update_all, :update, :destroy].each do |act| assert capability.can? act, UserPreference end end