Skip to content

Commit

Permalink
ensure poll is associated with postId
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Jan 31, 2024
1 parent 20b5917 commit 7abeebe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/integration/api/CreatePollTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ public function authorized_user_can_create_post_poll_on_api(int $userId)
$attributes = $data['attributes'];

$this->assertEquals('Add a poll to an existing post', $attributes['question']);

$pollId = $data['id'];
$this->assertNotNull($pollId);

$poll = Poll::find($pollId);
$this->assertNotNull($poll);
$this->assertEquals(1, $poll->post_id);
}

/**
Expand Down

0 comments on commit 7abeebe

Please sign in to comment.