Permalink
Browse files

TodoAppTest (新增 1 筆 task 並顯示在下方)

1 parent 74eb132 commit 3a91cbdf05d54dad4e869a00aacd290d963a9e5e Sam.IO.Hsiao committed Oct 18, 2016
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/TodoAppTest.php
View
@@ -36,4 +36,22 @@ public function 一啟動顯示3筆task()
'name' => 'Task 3',
]);
}
+
+ /** @test */
+ public function 新增1task並顯示在下方()
+ {
+ $this->visit($this->rootURL)
+ ->dontSee('Task 1')
+ ->dontSeeInDatabase('tasks', [
+ 'name' => 'Task 1'
+ ]);
+
+ $this->visit($this->rootURL)
+ ->type('Task 1', 'name')
+ ->press('Add Task')
+ ->see('Task 1')
+ ->seeInDatabase('tasks', [
+ 'name' => 'Task 1'
+ ]);
+ }
}

0 comments on commit 3a91cbd

Please sign in to comment.