Skip to content

Commit

Permalink
Tweaked tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux committed Sep 6, 2018
1 parent d3a7a0f commit ffacd10
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
41 changes: 22 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/Events/CreateEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class CreateEventTest extends SeatsioClientTest

public function testOnlyChartKeyIsRequired()
{
$chart = $this->seatsioClient->charts->create();
$chartKey = $this->createTestChart();

$event = $this->seatsioClient->events->create($chart->key);
$event = $this->seatsioClient->events->create($chartKey);

self::assertNotNull($event->key);
self::assertNotNull($event->id);
self::assertEquals($chart->key, $event->chartKey);
self::assertEquals($chartKey, $event->chartKey);
self::assertFalse($event->bookWholeTables);
self::assertFalse($event->supportsBestAvailable);
self::assertTrue($event->supportsBestAvailable);
self::assertNotNull($event->createdOn);
self::assertNull($event->forSaleConfig);
self::assertNull($event->updatedOn);
Expand Down
8 changes: 4 additions & 4 deletions tests/Events/RetrieveEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ class RetrieveEventTest extends SeatsioClientTest

public function test()
{
$chart = $this->seatsioClient->charts->create();
$event = $this->seatsioClient->events->create($chart->key);
$chartKey = $this->createTestChart();
$event = $this->seatsioClient->events->create($chartKey);

$retrievedEvent = $this->seatsioClient->events->retrieve($event->key);

self::assertEquals($event->key, $retrievedEvent->key);
self::assertEquals($event->id, $retrievedEvent->id);
self::assertEquals($chart->key, $retrievedEvent->chartKey);
self::assertEquals($chartKey, $retrievedEvent->chartKey);
self::assertFalse($retrievedEvent->bookWholeTables);
self::assertFalse($retrievedEvent->supportsBestAvailable);
self::assertTrue($retrievedEvent->supportsBestAvailable);
self::assertEquals($event->createdOn, $retrievedEvent->createdOn);
self::assertNull($retrievedEvent->forSaleConfig);
self::assertNull($retrievedEvent->updatedOn);
Expand Down

0 comments on commit ffacd10

Please sign in to comment.