Skip to content

Commit

Permalink
Fix assertionless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Nov 12, 2024
1 parent d1b168a commit 1d41e90
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions test/models/snapshot_item_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def test_restore_item!

@snapshot_item = @snapshot.snapshot_items.first

@snapshot_item.restore_item!
assert_nothing_raised do
@snapshot_item.restore_item!
end
end

def test_restore_item_handles_dropped_columns!
Expand All @@ -77,7 +79,9 @@ def test_restore_item_handles_dropped_columns!

snapshot_item.update!(object: attrs)

snapshot_item.restore_item!
assert_nothing_raised do
snapshot_item.restore_item!
end
end

end
8 changes: 6 additions & 2 deletions test/models/snapshot_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def test_snapshot_item_handles_enum_values_from_select_statement
def test_restore
@snapshot = @snapshot_klass.first

@snapshot.restore!
assert_nothing_raised do
@snapshot.restore!
end
end

def test_fetch_reified_items_with_readonly
Expand Down Expand Up @@ -202,7 +204,9 @@ def test_fetch_reified_items_handles_dropped_columns!

snapshot_item.update!(object: attrs)

reified_items = snapshot.fetch_reified_items(readonly: false)
assert_nothing_raised do
snapshot.fetch_reified_items(readonly: false)
end
end

def test_single_model_snapshots_without_children
Expand Down

0 comments on commit 1d41e90

Please sign in to comment.