Skip to content

Commit

Permalink
fixing comments for 2010 starter edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Smith committed Jan 23, 2014
1 parent 89a39ae commit 19dd9ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/axlsx/workbook/worksheet/comments.rb
Expand Up @@ -57,8 +57,7 @@ def authors
# @return [Array]
def relationships
[Relationship.new(self, VML_DRAWING_R, "../#{vml_drawing.pn}"),
Relationship.new(self, COMMENT_R, "../#{pn}"),
Relationship.new(self, COMMENT_R_NULL, "NULL")]
Relationship.new(self, COMMENT_R, "../#{pn}")]
end

# serialize the object
Expand Down
6 changes: 3 additions & 3 deletions test/workbook/worksheet/tc_worksheet.rb
Expand Up @@ -434,11 +434,11 @@ def test_relationships
c = @ws.add_chart Axlsx::Pie3DChart
assert_equal(@ws.relationships.size, 1, "multiple charts still only result in one relationship")
c = @ws.add_comment :text => 'builder', :author => 'bob', :ref => @ws.rows.last.cells.last
assert_equal(@ws.relationships.size, 4, "adding a comment adds 3 relationships")
assert_equal(@ws.relationships.size, 3, "adding a comment adds 2 relationships")
c = @ws.add_comment :text => 'not that is a comment!', :author => 'travis', :ref => "A1"
assert_equal(@ws.relationships.size, 4, "adding multiple comments in the same worksheet should not add any additional comment relationships")
assert_equal(@ws.relationships.size, 3, "adding multiple comments in the same worksheet should not add any additional comment relationships")
c = @ws.add_pivot_table 'G5:G6', 'A1:D10'
assert_equal(@ws.relationships.size, 5, "adding a pivot table adds 1 relationship")
assert_equal(@ws.relationships.size, 4, "adding a pivot table adds 1 relationship")
end


Expand Down

0 comments on commit 19dd9ed

Please sign in to comment.