summaryrefslogtreecommitdiffhomepage
path: root/test/rels
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-05 17:17:07 +0200
committerGeremia Taglialatela <[email protected]>2023-04-06 09:54:44 +0200
commit7e90a46d43fefcf5ff7c76c14b29b6998245cfc5 (patch)
tree0562b39547ee41e86504bf661390ce0d571ff066 /test/rels
parente9496a58dbf17d4b9bb615f3cb630f1e32574ece (diff)
downloadcaxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.tar.gz
caxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.zip
Remove Layout/TrailingWhitespace offenses
``` rubocop --only Layout/TrailingWhitespace -a ```
Diffstat (limited to 'test/rels')
-rw-r--r--test/rels/tc_relationship.rb10
-rw-r--r--test/rels/tc_relationships.rb4
2 files changed, 7 insertions, 7 deletions
diff --git a/test/rels/tc_relationship.rb b/test/rels/tc_relationship.rb
index f47b6a4d..b9674a19 100644
--- a/test/rels/tc_relationship.rb
+++ b/test/rels/tc_relationship.rb
@@ -1,13 +1,13 @@
require 'tc_helper.rb'
class TestRelationships < Test::Unit::TestCase
-
+
def test_instances_with_different_attributes_have_unique_ids
rel_1 = Axlsx::Relationship.new(Object.new, Axlsx::WORKSHEET_R, 'target')
rel_2 = Axlsx::Relationship.new(Object.new, Axlsx::COMMENT_R, 'foobar')
assert_not_equal rel_1.Id, rel_2.Id
end
-
+
def test_instances_with_same_attributes_share_id
source_obj = Object.new
instance = Axlsx::Relationship.new(source_obj, Axlsx::WORKSHEET_R, 'target')
@@ -21,18 +21,18 @@ class TestRelationships < Test::Unit::TestCase
[t1, t2].each(&:join)
assert_not_same(cache1, cache2)
end
-
+
def test_target_is_only_considered_for_same_attributes_check_if_target_mode_is_external
source_obj = Object.new
rel_1 = Axlsx::Relationship.new(source_obj, Axlsx::WORKSHEET_R, 'target')
rel_2 = Axlsx::Relationship.new(source_obj, Axlsx::WORKSHEET_R, '../target')
assert_equal rel_1.Id, rel_2.Id
-
+
rel_3 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, 'target', :target_mode => :External)
rel_4 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, '../target', :target_mode => :External)
assert_not_equal rel_3.Id, rel_4.Id
end
-
+
def test_type
assert_raise(ArgumentError) { Axlsx::Relationship.new nil, 'type', 'target' }
assert_nothing_raised { Axlsx::Relationship.new nil, Axlsx::WORKSHEET_R, 'target' }
diff --git a/test/rels/tc_relationships.rb b/test/rels/tc_relationships.rb
index fe5a1ce5..768570b1 100644
--- a/test/rels/tc_relationships.rb
+++ b/test/rels/tc_relationships.rb
@@ -7,12 +7,12 @@ class TestRelationships < Test::Unit::TestCase
rel_1 = Axlsx::Relationship.new(source_obj_1, Axlsx::WORKSHEET_R, "bar")
rel_2 = Axlsx::Relationship.new(source_obj_2, Axlsx::WORKSHEET_R, "bar")
rels = Axlsx::Relationships.new
- rels << rel_1
+ rels << rel_1
rels << rel_2
assert_equal rel_1, rels.for(source_obj_1)
assert_equal rel_2, rels.for(source_obj_2)
end
-
+
def test_valid_document
@rels = Axlsx::Relationships.new
schema = Nokogiri::XML::Schema(File.open(Axlsx::RELS_XSD))