Skip to content

Commit 1d41e90

Browse files
committed
Fix assertionless tests
1 parent d1b168a commit 1d41e90

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

test/models/snapshot_item_test.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def test_restore_item!
6464

6565
@snapshot_item = @snapshot.snapshot_items.first
6666

67-
@snapshot_item.restore_item!
67+
assert_nothing_raised do
68+
@snapshot_item.restore_item!
69+
end
6870
end
6971

7072
def test_restore_item_handles_dropped_columns!
@@ -77,7 +79,9 @@ def test_restore_item_handles_dropped_columns!
7779

7880
snapshot_item.update!(object: attrs)
7981

80-
snapshot_item.restore_item!
82+
assert_nothing_raised do
83+
snapshot_item.restore_item!
84+
end
8185
end
8286

8387
end

test/models/snapshot_test.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ def test_snapshot_item_handles_enum_values_from_select_statement
144144
def test_restore
145145
@snapshot = @snapshot_klass.first
146146

147-
@snapshot.restore!
147+
assert_nothing_raised do
148+
@snapshot.restore!
149+
end
148150
end
149151

150152
def test_fetch_reified_items_with_readonly
@@ -202,7 +204,9 @@ def test_fetch_reified_items_handles_dropped_columns!
202204

203205
snapshot_item.update!(object: attrs)
204206

205-
reified_items = snapshot.fetch_reified_items(readonly: false)
207+
assert_nothing_raised do
208+
snapshot.fetch_reified_items(readonly: false)
209+
end
206210
end
207211

208212
def test_single_model_snapshots_without_children

0 commit comments

Comments
 (0)