66use Illuminate \Routing \Route ;
77use Illuminate \Routing \Router ;
88use Illuminate \Support \Carbon ;
9- use Illuminate \Support \Facades \Schema ;
109use Stackkit \LaravelGoogleCloudTasksQueue \CloudTasksApi ;
11- use Stackkit \LaravelGoogleCloudTasksQueue \CloudTasksServiceProvider ;
1210use Stackkit \LaravelGoogleCloudTasksQueue \OpenIdVerificator ;
1311use Stackkit \LaravelGoogleCloudTasksQueue \StackkitCloudTask ;
1412use Tests \Support \FailingJob ;
1513use Tests \Support \SimpleJob ;
1614
17- class CloudTasksMonitoringTest extends TestCase
15+ class CloudTasksDashboardTest extends TestCase
1816{
1917 /**
2018 * @test
@@ -243,7 +241,7 @@ public function it_returns_info_about_a_specific_task()
243241 /**
244242 * @test
245243 */
246- public function when_a_job_is_dispatched_it_will_be_added_to_the_monitor ()
244+ public function when_a_job_is_dispatched_it_will_be_added_to_the_dashboard ()
247245 {
248246 // Arrange
249247 CloudTasksApi::fake ();
@@ -267,11 +265,11 @@ public function when_a_job_is_dispatched_it_will_be_added_to_the_monitor()
267265 /**
268266 * @test
269267 */
270- public function when_monitoring_is_disabled_jobs_will_not_be_added_to_the_monitor ()
268+ public function when_dashboard_is_disabled_jobs_will_not_be_added_to_the_dashboard ()
271269 {
272270 // Arrange
273271 CloudTasksApi::fake ();
274- config ()->set ('cloud-tasks.monitor .enabled ' , false );
272+ config ()->set ('cloud-tasks.dashboard .enabled ' , false );
275273
276274 // Act
277275 $ this ->dispatch (new SimpleJob ());
@@ -308,7 +306,7 @@ public function when_a_job_is_scheduled_it_will_be_added_as_such()
308306 /**
309307 * @test
310308 */
311- public function when_a_job_is_running_it_will_be_updated_in_the_monitor ()
309+ public function when_a_job_is_running_it_will_be_updated_in_the_dashboard ()
312310 {
313311 // Arrange
314312 \Illuminate \Support \Carbon::setTestNow (now ());
@@ -334,7 +332,7 @@ public function when_a_job_is_running_it_will_be_updated_in_the_monitor()
334332 /**
335333 * @test
336334 */
337- public function when_a_job_is_successful_it_will_be_updated_in_the_monitor ()
335+ public function when_a_job_is_successful_it_will_be_updated_in_the_dashboard ()
338336 {
339337 // Arrange
340338 \Illuminate \Support \Carbon::setTestNow (now ());
@@ -360,7 +358,7 @@ public function when_a_job_is_successful_it_will_be_updated_in_the_monitor()
360358 /**
361359 * @test
362360 */
363- public function when_a_job_errors_it_will_be_updated_in_the_monitor ()
361+ public function when_a_job_errors_it_will_be_updated_in_the_dashboard ()
364362 {
365363 // Arrange
366364 \Illuminate \Support \Carbon::setTestNow (now ());
@@ -387,7 +385,7 @@ public function when_a_job_errors_it_will_be_updated_in_the_monitor()
387385 /**
388386 * @test
389387 */
390- public function when_a_job_fails_it_will_be_updated_in_the_monitor ()
388+ public function when_a_job_fails_it_will_be_updated_in_the_dashboard ()
391389 {
392390 // Arrange
393391 \Illuminate \Support \Carbon::setTestNow (now ());
@@ -422,7 +420,7 @@ public function when_a_job_fails_it_will_be_updated_in_the_monitor()
422420 public function test_publish ()
423421 {
424422 // Arrange
425- config ()->set ('cloud-tasks.monitor .enabled ' , true );
423+ config ()->set ('cloud-tasks.dashboard .enabled ' , true );
426424
427425 // Act & Assert
428426 $ expectedPublishBase = dirname (__DIR__ );
@@ -436,7 +434,7 @@ public function test_publish()
436434 /**
437435 * @test
438436 */
439- public function when_monitoring_is_enabled_it_adds_the_necessary_routes ()
437+ public function when_dashboard_is_enabled_it_adds_the_necessary_routes ()
440438 {
441439 // Act
442440 $ routes = app (Router::class)->getRoutes ();
@@ -452,23 +450,23 @@ public function when_monitoring_is_enabled_it_adds_the_necessary_routes()
452450 /**
453451 * @test
454452 */
455- public function when_monitoring_is_enabled_it_adds_the_necessary_migrations ()
453+ public function when_dashboard_is_enabled_it_adds_the_necessary_migrations ()
456454 {
457455 $ this ->assertTrue (in_array (dirname (__DIR__ ) . '/src/../migrations ' , app ('migrator ' )->paths ()));
458456 }
459457
460458 /**
461459 * @test
462460 */
463- public function when_monitoring_is_disabled_it_adds_the_necessary_migrations ()
461+ public function when_dashboard_is_disabled_it_adds_the_necessary_migrations ()
464462 {
465463 $ this ->assertEmpty (app ('migrator ' )->paths ());
466464 }
467465
468466 /**
469467 * @test
470468 */
471- public function when_monitoring_is_disabled_it_does_not_add_the_monitor_routes ()
469+ public function when_dashboard_is_disabled_it_does_not_add_the_dashboard_routes ()
472470 {
473471 // Act
474472 $ routes = app (Router::class)->getRoutes ();
@@ -484,7 +482,7 @@ public function when_monitoring_is_disabled_it_does_not_add_the_monitor_routes()
484482 /**
485483 * @test
486484 */
487- public function monitoring_is_password_protected ()
485+ public function dashboard_is_password_protected ()
488486 {
489487 // Arrange
490488 $ this ->defaultHeaders ['Authorization ' ] = '' ;
@@ -533,7 +531,7 @@ public function there_is_a_login_endpoint()
533531 {
534532 // Arrange
535533 Carbon::setTestNow ($ now = now ());
536- config ()->set ('cloud-tasks.monitor .password ' , bcrypt ( 'test123 ' ) );
534+ config ()->set ('cloud-tasks.dashboard .password ' , 'test123 ' );
537535
538536 // Act
539537 $ invalidPassword = $ this ->postJson ('/cloud-tasks-api/login ' , ['password ' => 'hey ' ]);
0 commit comments