]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/EntityTest.php
Added migration file.
[bookstack] / tests / Entity / EntityTest.php
index 180b302c6d299bb16a84ea3f2b5c7d7cc7cf9159..ccc02c4f06c85eb6875226e9d146f5374e12a6d7 100644 (file)
@@ -5,7 +5,6 @@ use BookStack\Chapter;
 use BookStack\Page;
 use BookStack\Repos\EntityRepo;
 use BookStack\Repos\UserRepo;
-use ImageTest;
 
 class EntityTest extends BrowserKitTest
 {
@@ -138,7 +137,6 @@ class EntityTest extends BrowserKitTest
         $book = factory(Book::class)->make([
             'name' => 'My First Book'
         ]);
-        $imagePath = uploadImage('test-image.jpg', 0);
         $this->asAdmin()
             ->visit('/books')
             // Choose to create a book
@@ -147,27 +145,16 @@ class EntityTest extends BrowserKitTest
             // Fill out form & save
             ->type($book->name, '#name')
             ->type($book->description, '#description')
-            ->press('Select Image')
-            ->click('test-image.jpg')
-            ->press('Select Image')
             ->press('Save Book')
             // Check it redirects correctly
             ->seePageIs('/books/my-first-book')
             ->see($book->name)->see($book->description);
 
-        $book = factory(Book::class)->latest();
-        $this->assertDatabaseHas('images', [
-        'id' => $book->image
-        ]);
-
         // Ensure duplicate names are given different slugs
         $this->asAdmin()
             ->visit('/books/create')
             ->type($book->name, '#name')
             ->type($book->description, '#description')
-            ->press('Select Image')
-            ->click('test-image.jpg')
-            ->press('Select Image')
             ->press('Save Book');
         
         $expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
@@ -269,12 +256,4 @@ class EntityTest extends BrowserKitTest
             ->visit('/')
             ->seeInElement('#recently-updated-pages', $page->name);
     }
-
-    public function test_recently_created_pages_on_home()
-    {
-        $entityChain = $this->createEntityChainBelongingToUser($this->getEditor());
-        $this->asAdmin()->visit('/')
-            ->seeInElement('#recently-created-pages', $entityChain['page']->name);
-    }
-
 }