Sha256: eeaea528443d3909736c7f5d6af39c15db7ac6c94a311333cdd601c1e4df2323

Contents?: true

Size: 858 Bytes

Versions: 19

Compression:

Stored size: 858 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'

class TestVortexTags < 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 "publish articles with tags" do
    url = 'https://vortex-dav.uio.no/brukere/thomasfl/nyheter/my-sample-title.html'
    if(@vortex.exists?(url))
      @vortex.delete(url)
    end

    @vortex.cd('/brukere/thomasfl/nyheter/')
    article = Vortex::HtmlArticle.new(:title => "My Sample Title", :introduction => "Introduction",
                                      :body => "<p>Hello world</p>", :tags => ['tag 1','tag 2','tag 3'])
    published_url = @vortex.publish(article)
    assert @vortex.exists?(published_url)
    assert  published_url == url
  end

end

Version data entries

19 entries across 16 versions & 1 rubygems

Version Path
vortex_client-0.7.3 test/test_vortex_tags.rb
vortex_client-0.7.2 test/test_vortex_tags.rb
vortex_client-0.7.0 test/test_vortex_tags.rb
vortex_client-0.6.0 test/test_vortex_tags.rb
vortex_client-0.5.9 test/test_vortex_tags.rb
vortex_client-0.5.8 test/test_vortex_tags.rb
vortex_client-0.5.6 test/test_vortex_tags.rb
vortex_client-0.5.5 test/test_vortex_tags.rb
vortex_client-0.5.4 test/test_vortex_tags.rb
vortex_client-0.5.3 test/test_vortex_tags_flymake.rb
vortex_client-0.5.3 test/test_vortex_tags.rb
vortex_client-0.5.2 test/test_vortex_tags_flymake.rb
vortex_client-0.5.2 test/test_vortex_tags.rb
vortex_client-0.5.1 test/test_vortex_tags_flymake.rb
vortex_client-0.5.1 test/test_vortex_tags.rb
vortex_client-0.5.0 test/test_vortex_tags.rb
vortex_client-0.4.0 test/test_vortex_tags.rb
vortex_client-0.3.1 test/test_vortex_tags.rb
vortex_client-0.3.0 test/test_vortex_tags.rb