Skip to content

Commit bf50d05

Browse files
Copilotfbacall
andauthored
Add integration test for events calendar rendering
Agent-Logs-Url: https://github.com/ElixirTeSS/TeSS/sessions/427a7bae-9e9f-4ae8-8977-17b925fec24c Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
1 parent 33a68ef commit bf50d05

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
require 'test_helper'
2+
3+
class EventsCalendarIntegrationTest < ActionDispatch::IntegrationTest
4+
test 'calendar page loads and renders event calendar' do
5+
freeze_time(Time.utc(2026, 5, 20, 12, 0, 0)) do
6+
Event.create!(
7+
title: 'System calendar event',
8+
url: 'http://example.com/system-calendar-event',
9+
user: users(:regular_user),
10+
content_provider: content_providers(:goblet),
11+
timezone: 'UTC',
12+
start: Time.now.beginning_of_month + 10.days,
13+
end: Time.now.beginning_of_month + 10.days + 2.hours,
14+
city: 'Manchester',
15+
country: 'United Kingdom'
16+
)
17+
18+
get calendar_events_path
19+
20+
assert_response :success
21+
assert_select '#events-calendar #calendar.simple-calendar'
22+
assert_select '#events-calendar table.table.table-striped'
23+
assert_select '#events-calendar a.clear-both', text: 'System calendar event'
24+
end
25+
end
26+
end

0 commit comments

Comments
 (0)