Skip to content

Commit

Permalink
(test): UserRolesCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonvanWijhe committed Nov 7, 2024
1 parent 06952d3 commit 269981d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Console/UserRolesCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<?php

declare(strict_types=1);

use Yard\UserRoles\Facades\UserRoles;

it('calls setRoles on UserRoles and outputs messages', function () {
UserRoles::shouldReceive('setRoles')->once();

$this->artisan('roles:create')
->expectsOutput('Updating roles...')
->expectsOutput('All done!')
->assertExitCode(0);
});

0 comments on commit 269981d

Please sign in to comment.