# -*- coding: utf-8 -*- require 'helper' class TestVortexCollection < Test::Unit::TestCase include Vortex def setup if(not(@vortex)) user = ENV['DAVUSER'] pass = ENV['DAVPASS'] @vortex = Vortex::Connection.new("https://vortex-dav.uio.no/",user, pass) end end should "create collection (folder)" do url = 'https://vortex-dav.uio.no/brukere/thomasfl/nyheter/my-collection' if(@vortex.exists?(url)) @vortex.delete(url) end @vortex.cd('/brukere/thomasfl/nyheter/') collection = ArticleListingCollection.new(:url => 'my-collection', :title => 'My Collection') created_path = @vortex.create(collection) assert @vortex.exists?(created_path) assert created_path == url end end