Skip to content

Commit

Permalink
Test that an error is raised if we try to initialise on a STI class
Browse files Browse the repository at this point in the history
  • Loading branch information
brendon committed Feb 28, 2024
1 parent b37b561 commit 44ccbdb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_positioning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def test_that_position_columns_must_have_unique_keys
end
end

def test_that_an_error_is_raised_when_initialising_on_non_base_class
assert_raises(Positioning::Error) do
Author::Student.send :positioned
end
end

def test_that_the_default_list_scope_works
list = List.create name: "First List"
first_item = list.items.create name: "First Item"
Expand Down

0 comments on commit 44ccbdb

Please sign in to comment.