Skip to content

Commit e19794c

Browse files
committed
Output a success statement after deleting a feature flag
1 parent fb27f76 commit e19794c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Console/DeleteCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ public function handle()
2727
{
2828
$name = $this->argument('feature');
2929
$this->rollout->remove($name);
30+
$this->line(sprintf("The '%s' flag was removed.", $name));
3031
}
3132
}

tests/Console/DeleteCommandTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Tests\TestCase;
66
use Opensoft\Rollout\Rollout;
77
use Illuminate\Support\Facades\Artisan;
8+
use Illuminate\Contracts\Console\Kernel;
89
use Jaspaul\LaravelRollout\Drivers\Cache;
910

1011
class DeleteCommandTest extends TestCase
@@ -29,4 +30,18 @@ function running_the_command_with_a_feature_will_remove_the_corresponding_featur
2930

3031
$this->assertEquals('', $store->get('rollout.feature:__features__'));
3132
}
33+
34+
/**
35+
* @test
36+
*/
37+
function running_the_command_outputs_a_success_statement()
38+
{
39+
Artisan::call('rollout:delete', [
40+
'feature' => 'derp'
41+
]);
42+
43+
$output = $this->app[Kernel::class]->output();
44+
45+
$this->assertContains('derp', $output);
46+
}
3247
}

0 commit comments

Comments
 (0)