diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-06 04:20:55 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-06 04:20:55 +0200 |
| commit | 970f10854bccee0528de8435e5a65cdcc18ba93e (patch) | |
| tree | 3d6b96fc6594241fade803df4c1862301c454767 /test/controllers | |
| parent | 81a07bfca08fda8ce762f2282d3bd5f6909dc923 (diff) | |
Remove dead custom_rrule references after column drop
events#index still read event.custom_rrule - a live bug the column-drop
migration introduced, not just stale test data. Caught by four test
failures (three fixtures/direct attribute hashes still setting the
removed column, one UnknownAttributeError from a stale fixture loaded
before any test method runs), none of which were actually testing this
view - "should get index" passed throughout with zero Event records
present, meaning it could never have caught a per-row rendering bug.
Strengthened to create one real event first, so a future stray
reference to a dropped or renamed column fails loudly instead of
silently passing on an empty table.
Diffstat (limited to 'test/controllers')
| -rw-r--r-- | test/controllers/events_controller_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/controllers/events_controller_test.rb b/test/controllers/events_controller_test.rb index 9371ca7..46f3f4f 100644 --- a/test/controllers/events_controller_test.rb +++ b/test/controllers/events_controller_test.rb | |||
| @@ -4,6 +4,9 @@ class EventsControllerTest < ActionController::TestCase | |||
| 4 | 4 | ||
| 5 | test "should get index" do | 5 | test "should get index" do |
| 6 | login_as :quentin | 6 | login_as :quentin |
| 7 | node = create_node_with_published_page | ||
| 8 | Event.create!(node_id: node.id, start_time: Time.now, end_time: Time.now + 1.hour) | ||
| 9 | |||
| 7 | get :index | 10 | get :index |
| 8 | assert_response :success | 11 | assert_response :success |
| 9 | assert_not_nil assigns(:events) | 12 | assert_not_nil assigns(:events) |
