Skip to content

Commit

Permalink
Output a success statement after deleting a feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaspaul committed Mar 30, 2017
1 parent fb27f76 commit e19794c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Console/DeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ public function handle()
{
$name = $this->argument('feature');
$this->rollout->remove($name);
$this->line(sprintf("The '%s' flag was removed.", $name));
}
}
15 changes: 15 additions & 0 deletions tests/Console/DeleteCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Tests\TestCase;
use Opensoft\Rollout\Rollout;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Contracts\Console\Kernel;
use Jaspaul\LaravelRollout\Drivers\Cache;

class DeleteCommandTest extends TestCase
Expand All @@ -29,4 +30,18 @@ function running_the_command_with_a_feature_will_remove_the_corresponding_featur

$this->assertEquals('', $store->get('rollout.feature:__features__'));
}

/**
* @test
*/
function running_the_command_outputs_a_success_statement()
{
Artisan::call('rollout:delete', [
'feature' => 'derp'
]);

$output = $this->app[Kernel::class]->output();

$this->assertContains('derp', $output);
}
}

0 comments on commit e19794c

Please sign in to comment.