]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/EntityTest.php
Merge branch 'v0.11'
[bookstack] / tests / Entity / EntityTest.php
index 8c0c286a6c271939567eb73445df77e9c94ff775..296aa72edc1491ae703e3fab90a92b15db85cf7e 100644 (file)
@@ -151,8 +151,10 @@ class EntityTest extends TestCase
             ->visit('/books/create')
             ->type($book->name, '#name')
             ->type($book->description, '#description')
-            ->press('Save Book')
-            ->seePageIs('/books/my-first-book-2');
+            ->press('Save Book');
+        
+        $expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
+        $this->assertRegExp($expectedPattern, $this->currentUri, "Did not land on expected page [$expectedPattern].\n");
 
         $book = \BookStack\Book::where('slug', '=', 'my-first-book')->first();
         return $book;