aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-10-25 12:53:29 +0200
committerWilly Micieli <micieli@laposte.net>2019-10-25 12:53:29 +0200
commita02241f8f93ee377804cb012b3d4fbe85009a595 (patch)
treea82f088db8e09019c2eaa6fe76a358ed7192006b
parentb3a195e6d49c1c3af3b64a6dabeedfc62263a21e (diff)
downloadimperium-a02241f8f93ee377804cb012b3d4fbe85009a595.zip
imperium-a02241f8f93ee377804cb012b3d4fbe85009a595.tar.gz
add tests
-rw-r--r--imperium/Routing/Router.php2
-rw-r--r--tests/Model/CrudTest.php12
2 files changed, 11 insertions, 3 deletions
diff --git a/imperium/Routing/Router.php b/imperium/Routing/Router.php
index e66bf7e..1de250e 100644
--- a/imperium/Routing/Router.php
+++ b/imperium/Routing/Router.php
@@ -127,8 +127,6 @@
}
}
-
-
return to(route('web','404'));
}
diff --git a/tests/Model/CrudTest.php b/tests/Model/CrudTest.php
index 5529d2d..313b2ae 100644
--- a/tests/Model/CrudTest.php
+++ b/tests/Model/CrudTest.php
@@ -31,7 +31,17 @@ class CrudTest extends Unit
*/
public function test_show()
{
- $this->assertTrue($this->crud->show('users',1)->isOk());
+ $this->assertTrue($this->crud->show('users')->isOk());
+
+ }
+
+ /**
+ * @throws Kedavra
+ */
+ public function test_home()
+ {
+ $this->assertTrue($this->crud->home()->isOk());
+ $this->assertTrue($this->crud->clear('countries')->isRedirect('/countries'));
}