summaryrefslogtreecommitdiffhomepage
path: root/test/rels/tc_relationship.rb
blob: ef9954498fe46463e6dd7923ffc16fd38809650a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'tc_helper.rb'

class TestRelationships < Test::Unit::TestCase
  def setup
  end

  def teardown
  end

  def test_type
    assert_raise(ArgumentError) { Axlsx::Relationship.new 'type', 'target' }
    assert_nothing_raised { Axlsx::Relationship.new Axlsx::WORKSHEET_R, 'target' }
    assert_nothing_raised { Axlsx::Relationship.new Axlsx::COMMENT_R, 'target' }
  end

  def test_target_mode
    assert_raise(ArgumentError) { Axlsx::Relationship.new 'type', 'target', :target_mode => "FISH" }
    assert_nothing_raised { Axlsx::Relationship.new( Axlsx::WORKSHEET_R, 'target', :target_mode => :External) }
  end

end