mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 16:32:09 +00:00
Implement instant websocket room updates
This commit is contained in:
@@ -40,7 +40,7 @@ test('a participant can vote and change their vote in the current round', functi
|
||||
|
||||
$this->withSession($session)
|
||||
->post(route('room.vote.store', $room), ['value' => '5'])
|
||||
->assertRedirect();
|
||||
->assertNoContent();
|
||||
|
||||
$this->assertDatabaseHas('votes', [
|
||||
'room_id' => $room->id,
|
||||
@@ -51,7 +51,7 @@ test('a participant can vote and change their vote in the current round', functi
|
||||
|
||||
$this->withSession($session)
|
||||
->post(route('room.vote.store', $room), ['value' => '8'])
|
||||
->assertRedirect();
|
||||
->assertNoContent();
|
||||
|
||||
expect(Vote::query()->count())->toBe(1);
|
||||
expect(Vote::query()->value('value'))->toBe('8')
|
||||
@@ -91,7 +91,7 @@ test('other votes stay hidden until the moderator reveals the round', function (
|
||||
|
||||
$this->withSession($session)
|
||||
->post(route('room.reveal', $room))
|
||||
->assertRedirect();
|
||||
->assertNoContent();
|
||||
|
||||
expect($room->fresh()->last_activity_at->greaterThan($previousActivity))->toBeTrue();
|
||||
|
||||
@@ -123,7 +123,7 @@ test('starting the next round clears the revealed state', function () {
|
||||
|
||||
$this->withSession(["room_players.{$room->id}" => $moderator->id])
|
||||
->post(route('room.next-round', $room))
|
||||
->assertRedirect();
|
||||
->assertNoContent();
|
||||
|
||||
$room->refresh();
|
||||
|
||||
@@ -156,7 +156,7 @@ test('the moderator can reset only the votes from the current round', function (
|
||||
|
||||
$this->withSession(["room_players.{$room->id}" => $moderator->id])
|
||||
->post(route('room.reset', $room))
|
||||
->assertRedirect();
|
||||
->assertNoContent();
|
||||
|
||||
$this->assertDatabaseHas('votes', [
|
||||
'room_id' => $room->id,
|
||||
|
||||
Reference in New Issue
Block a user