Skip to content

Commit

Permalink
fixup! chore: add integration tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Jun 26, 2023
1 parent afb20a6 commit 119e5b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
19 changes: 2 additions & 17 deletions tests/php/integration/Db/AppointmentConfigMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,14 @@ public function testFindById() {
$id = $appointment->getId();
$appointment = $this->mapper->findById($id);

$this->assertObjectHasAttribute('token', $appointment);

$this->assertEquals('okens', $appointment->getToken());
$this->assertObjectHasAttribute('name', $appointment);
$this->assertEquals('Test 2', $appointment->getName());
$this->assertObjectHasAttribute('description', $appointment);
$this->assertEquals('Test Description', $appointment->getDescription());
$this->assertObjectHasAttribute('increment', $appointment);
$this->assertEquals(15 * 60, $appointment->getIncrement());
$this->assertObjectHasAttribute('length', $appointment);
$this->assertEquals(60 * 60, $appointment->getLength());
$this->assertObjectHasAttribute('targetCalendarUri', $appointment);
$this->assertEquals('testuri', $appointment->getTargetCalendarUri());
$this->assertObjectHasAttribute('visibility', $appointment);
$this->assertEquals(AppointmentConfig::VISIBILITY_PUBLIC, $appointment->getVisibility());
$this->assertObjectHasAttribute('userId', $appointment);
$this->assertEquals('testuser', $appointment->getUserId());
}

Expand All @@ -114,21 +107,14 @@ public function testFindByToken() {
$token = $appointment->getToken();
$appointment = $this->mapper->findByToken($token);

$this->assertObjectHasAttribute('token', $appointment);

$this->assertEquals('okensdsadsas', $appointment->getToken());
$this->assertObjectHasAttribute('name', $appointment);
$this->assertEquals('Test 2', $appointment->getName());
$this->assertObjectHasAttribute('description', $appointment);
$this->assertEquals('Test Description', $appointment->getDescription());
$this->assertObjectHasAttribute('increment', $appointment);
$this->assertEquals(15 * 60, $appointment->getIncrement());
$this->assertObjectHasAttribute('length', $appointment);
$this->assertEquals(60 * 60, $appointment->getLength());
$this->assertObjectHasAttribute('targetCalendarUri', $appointment);
$this->assertEquals('testuri', $appointment->getTargetCalendarUri());
$this->assertObjectHasAttribute('visibility', $appointment);
$this->assertEquals(AppointmentConfig::VISIBILITY_PUBLIC, $appointment->getVisibility());
$this->assertObjectHasAttribute('userId', $appointment);
$this->assertEquals('testuser', $appointment->getUserId());
}

Expand All @@ -149,7 +135,6 @@ public function testFindAllForUser():void {
$this->assertNotEmpty($appointments);

foreach ($appointments as $appointment) {
$this->assertObjectHasAttribute('userId', $appointment);
$this->assertEquals('testuser', $appointment->getUserId());
}
}
Expand Down
8 changes: 0 additions & 8 deletions tests/php/integration/Db/BookingMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,13 @@ public function testFindByToken() {
$token = $booking->getToken();
$booking = $this->mapper->findByToken($token);

$this->assertObjectHasAttribute('apptConfigId', $booking);
$this->assertEquals('1', $booking->getApptConfigId());
$this->assertObjectHasAttribute('createdAt', $booking);
$this->assertEquals($this->time->getTime(), $booking->getCreatedAt());
$this->assertObjectHasAttribute('token', $booking);
$this->assertEquals('oken', $booking->getToken());
$this->assertObjectHasAttribute('displayName', $booking);
$this->assertEquals('Test', $booking->getDisplayName());
$this->assertObjectHasAttribute('start', $booking);
$this->assertEquals(123, $booking->getStart());
$this->assertObjectHasAttribute('end', $booking);
$this->assertEquals(123, $booking->getEnd());
$this->assertObjectHasAttribute('email', $booking);
$this->assertEquals('test@test.com', $booking->getEmail());
$this->assertObjectHasAttribute('timezone', $booking);
$this->assertEquals('Europe/Berlin', $booking->getTimezone());
}

Expand Down

0 comments on commit 119e5b9

Please sign in to comment.