]> BookStack Code Mirror - bookstack/commitdiff
Updated 404 test to not fail based on random long name 947/head
authorDan Brown <redacted>
Fri, 21 Sep 2018 14:24:29 +0000 (15:24 +0100)
committerDan Brown <redacted>
Fri, 21 Sep 2018 14:24:29 +0000 (15:24 +0100)
tests/ErrorTest.php

index c9b5a0109cc2544cc072c824caf737658e0602aa..a5e4a4a5e58b9d1e237fa37240cca6d7079154de 100644 (file)
@@ -9,10 +9,13 @@ class ErrorTest extends TestCase
         // if our custom, middleware-loaded handler fails but this is here
         // as a reminder and as a general check in the event of other issues.
         $editor = $this->getEditor();
         // if our custom, middleware-loaded handler fails but this is here
         // as a reminder and as a general check in the event of other issues.
         $editor = $this->getEditor();
+        $editor->name = 'tester';
+        $editor->save();
+
         $this->actingAs($editor);
         $notFound = $this->get('/fgfdngldfnotfound');
         $notFound->assertStatus(404);
         $notFound->assertDontSeeText('Log in');
         $this->actingAs($editor);
         $notFound = $this->get('/fgfdngldfnotfound');
         $notFound->assertStatus(404);
         $notFound->assertDontSeeText('Log in');
-        $notFound->assertSeeText($editor->getShortName(9));
+        $notFound->assertSeeText('tester');
     }
 }
\ No newline at end of file
     }
 }
\ No newline at end of file