Skip to content

Commit

Permalink
Merge pull request #154 from makbeta/master
Browse files Browse the repository at this point in the history
Add tests for ICS PRODID & DSTAMP properties
  • Loading branch information
lptn authored Aug 20, 2022
2 parents 0fe52ba + 815e5e6 commit fb4d9a1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Generators/IcsGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,19 @@ public function it_can_generate_an_ics_link_with_custom_uid()
$this->generator(['UID' => 'random-uid'])->generate($this->createShortEventLink())
);
}

/** @test */
public function it_has_a_product_id()
{
$this->assertMatchesSnapshot(
$this->generator(['PRODID' => 'Spatie calendar-links'])->generate($this->createShortEventLink())
);
}
/** @test */
public function it_has_a_product_dtstamp()
{
$this->assertMatchesSnapshot(
$this->generator(['DTSTAMP' => 'TZID=UTC:20180201T090000'])->generate($this->createShortEventLink())
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Spatie calendar-links
BEGIN:VEVENT
UID:94ab75add84a67c019eae57539658036
SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Spatie calendar-links
BEGIN:VEVENT
UID:94ab75add84a67c019eae57539658036
SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR

0 comments on commit fb4d9a1

Please sign in to comment.