@@ -23,6 +23,8 @@ protected function setUp(): void
2323 'start_time ' => '11:00 ' ,
2424 'end_time ' => '12:00 ' ,
2525 'location ' => 'The Location ' ,
26+ 'description ' => 'The description ' ,
27+ 'link ' => 'https://transformstudios.com '
2628 ])->save ();
2729 }
2830
@@ -38,6 +40,8 @@ public function can_create_single_day_event_ics_file()
3840
3941 $ this ->assertStringContainsString ('DTSTART: ' .now ()->setTimeFromTimeString ('11:00 ' )->format ('Ymd\THis ' ), $ response ->streamedContent ());
4042 $ this ->assertStringContainsString ('LOCATION:The Location ' , $ response ->streamedContent ());
43+ $ this ->assertStringContainsString ('DESCRIPTION:The description ' , $ response ->streamedContent ());
44+ $ this ->assertStringContainsString ('URL:https://transformstudios.com ' , $ response ->streamedContent ());
4145 }
4246
4347 #[Test]
@@ -55,6 +59,9 @@ public function can_create_single_day_recurring_event_ics_file()
5559 'start_time ' => '11:00 ' ,
5660 'end_time ' => '12:00 ' ,
5761 'recurrence ' => 'weekly ' ,
62+ 'location ' => 'The Location ' ,
63+ 'description ' => 'The description ' ,
64+ 'link ' => 'https://transformstudios.com '
5865 ])->save ();
5966
6067 $ response = $ this ->get (route ('statamic.events.ics.show ' , [
@@ -63,6 +70,9 @@ public function can_create_single_day_recurring_event_ics_file()
6370 ]))->assertDownload ('recurring-event.ics ' );
6471
6572 $ this ->assertStringContainsString ('DTSTART: ' .now ()->setTimeFromTimeString ('11:00 ' )->format ('Ymd\THis ' ), $ response ->streamedContent ());
73+ $ this ->assertStringContainsString ('LOCATION:The Location ' , $ response ->streamedContent ());
74+ $ this ->assertStringContainsString ('DESCRIPTION:The description ' , $ response ->streamedContent ());
75+ $ this ->assertStringContainsString ('URL:https://transformstudios.com ' , $ response ->streamedContent ());
6676
6777 $ this ->get (route ('statamic.events.ics.show ' , [
6878 'date ' => now ()->addDay ()->toDateString (),
@@ -75,13 +85,16 @@ public function can_create_single_day_multiday_event_ics_file()
7585 {
7686 Carbon::setTestNow (now ());
7787
78- $ entry = Entry::make ()
88+ Entry::make ()
7989 ->slug ('multi-day-event ' )
8090 ->collection ('events ' )
8191 ->id ('the-multi-day-event ' )
8292 ->data ([
8393 'title ' => 'Multi-day Event ' ,
8494 'multi_day ' => true ,
95+ 'location ' => 'The Location ' ,
96+ 'description ' => 'The description ' ,
97+ 'link ' => 'https://transformstudios.com ' ,
8598 'days ' => [
8699 [
87100 'date ' => now ()->toDateString (),
@@ -112,6 +125,10 @@ public function can_create_single_day_multiday_event_ics_file()
112125 ]))->assertDownload ('multi-day-event.ics ' );
113126
114127 $ this ->assertStringContainsString ('DTSTART: ' .now ()->addDay ()->setTimeFromTimeString ('11:00 ' )->format ('Ymd\THis ' ), $ response ->streamedContent ());
128+ $ this ->assertStringContainsString ('LOCATION:The Location ' , $ response ->streamedContent ());
129+ $ this ->assertStringContainsString ('DESCRIPTION:The description ' , $ response ->streamedContent ());
130+ $ this ->assertStringContainsString ('URL:https://transformstudios.com ' , $ response ->streamedContent ());
131+
115132 }
116133
117134 #[Test]
0 commit comments