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
+
+ test "create collection with properties" do
+ act_as_system_user do
+ c = Collection.create(manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n",
+ properties: {'property_1' => 'value_1'})
+ assert c.valid?
+ assert_equal 'value_1', c.properties['property_1']
+ end
+ end
end