summaryrefslogtreecommitdiff
path: root/tests/units/Model/ConfigTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-30 22:21:35 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-30 22:21:35 -0400
commit792d5a20bcb4926c91311afced67ddd008c3b79e (patch)
tree93ceaa5a5205bcb22fa00eaf91be95d5527bebc6 /tests/units/Model/ConfigTest.php
parent8970fba41f9ecf46e9d4e477aeb11f81f84d96c7 (diff)
Make sure there is always a trailing slash for application_url
Diffstat (limited to 'tests/units/Model/ConfigTest.php')
-rw-r--r--tests/units/Model/ConfigTest.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/units/Model/ConfigTest.php b/tests/units/Model/ConfigTest.php
index c0ed0313..832575b8 100644
--- a/tests/units/Model/ConfigTest.php
+++ b/tests/units/Model/ConfigTest.php
@@ -7,6 +7,20 @@ use Core\Session;
class ConfigTest extends Base
{
+ public function testSaveApplicationUrl()
+ {
+ $c = new Config($this->container);
+
+ $this->assertTrue($c->save(array('application_url' => 'http://localhost/')));
+ $this->assertEquals('http://localhost/', $c->get('application_url'));
+
+ $this->assertTrue($c->save(array('application_url' => 'http://localhost')));
+ $this->assertEquals('http://localhost/', $c->get('application_url'));
+
+ $this->assertTrue($c->save(array('application_url' => '')));
+ $this->assertEquals('', $c->get('application_url'));
+ }
+
public function testDefaultValues()
{
$c = new Config($this->container);
@@ -56,11 +70,4 @@ class ConfigTest extends Base
session_id('');
unset($this->container['session']);
}
-
- public function testSave()
- {
- $c = new Config($this->container);
- $this->assertTrue($c->save(array('application_url' => 'http://localhost/')));
- $this->assertEquals('http://localhost/', $c->get('application_url'));
- }
}