Sha256: 2bca1f89374324df06df7b4f2ac57d45fdf2ffa6263dd7cd5c4427d41e4d1ca0
Contents?: true
Size: 1001 Bytes
Versions: 16
Compression:
Stored size: 1001 Bytes
Contents
# -*- coding: utf-8 -*- require 'helper' class TestVortexClientUtils < Test::Unit::TestCase include Vortex def setup if(not(@vortex)) user = ENV['DAVUSER'] pass = ENV['DAVPASS'] @vortex = Connection.new("https://vortex-dav.uio.no/",user, pass) end end should "publish articles" do url = 'https://vortex-dav.uio.no/brukere/thomasfl/nyheter/sample-title-2.html' if(@vortex.exists?(url)) @vortex.delete(url) end @vortex.cd('/brukere/thomasfl/nyheter/') article = Vortex::HtmlArticle.new(:title => "Sample Title 2", :introduction => "Sample introduction", :body => "<p>Hello world</p>", ## :date => Time.now, :publishedDate => "05.01.2010 12:00", :author => "Thomas Flemming") @vortex.publish(article) assert @vortex.exists?(url) end end
Version data entries
16 entries across 16 versions & 1 rubygems