X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cadb785fc63280862d71376def0128e4c70951f0..9b61792d905324a98b24224d45347082efbe5205:/services/api/test/unit/collection_test.rb diff --git a/services/api/test/unit/collection_test.rb b/services/api/test/unit/collection_test.rb index 16d041bea2..1386a25e74 100644 --- a/services/api/test/unit/collection_test.rb +++ b/services/api/test/unit/collection_test.rb @@ -81,4 +81,14 @@ class CollectionTest < ActiveSupport::TestCase end end end + + [0, 2, 4, nil].each do |ask| + test "replication_desired reports #{ask or 2} if redundancy is #{ask}" do + act_as_user users(:active) do + c = collections(:collection_owned_by_active) + c.update_attributes redundancy: ask + assert_equal (ask or 2), c.replication_desired + end + end + end end