[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [websites/paste-kde-org] app: Test cases for expiration option
From: Sayak Banerjee <sayakb () kde ! org>
Date: 2014-11-01 22:48:48
Message-ID: E1XkhTU-0000Ov-AU () scm ! kde ! org
[Download RAW message or body]
Git commit b8efc560518b469b52b79925786c8dae623d62f6 by Sayak Banerjee.
Committed on 01/11/2014 at 22:36.
Pushed by sayakb into branch 'master'.
Test cases for expiration option
M +21 -0 app/config/schema.php
M +4 -4 app/tests/steps/CreateTest.php
http://commits.kde.org/websites/paste-kde-org/b8efc560518b469b52b79925786c8dae623d62f6
diff --git a/app/config/schema.php b/app/config/schema.php
index 0faacfa..5af41f8 100755
--- a/app/config/schema.php
+++ b/app/config/schema.php
@@ -789,6 +789,27 @@ return array(
),
+ '1.8' => array(
+
+ 'closure' => function()
+ {
+
+ $config = Site::config('general');
+
+ $noExpire = 'all';
+
+ // Modify config values
+ if (isset($config->noExpire) AND ! $config->noExpire)
+ {
+ Site::config('general', array(
+ 'noExpire' => 'none',
+ ));
+ }
+
+ },
+
+ ),
+
),
);
diff --git a/app/tests/steps/CreateTest.php b/app/tests/steps/CreateTest.php
index 915c5de..7eb80df 100755
--- a/app/tests/steps/CreateTest.php
+++ b/app/tests/steps/CreateTest.php
@@ -45,13 +45,13 @@ class CreateTest extends StickyNotesTestCase {
{
$this->initTestStep(FALSE);
- Site::config('general', array('guest_posts' => '0'));
+ Site::config('general', array('guestPosts' => '0'));
$this->call('GET', '/');
$this->assertRedirectedTo('user/login');
- Site::config('general', array('guest_posts' => '1'));
+ Site::config('general', array('guestPosts' => '1'));
}
/**
@@ -62,7 +62,7 @@ class CreateTest extends StickyNotesTestCase {
{
$this->initTestStep();
- Site::config('general', array('no_expire' => 'none'));
+ Site::config('general', array('noExpire' => 'none'));
$response = $this->client->request('GET', '/');
@@ -79,7 +79,7 @@ class CreateTest extends StickyNotesTestCase {
{
$this->initTestStep(FALSE);
- Site::config('general', array('no_expire' => 'user'));
+ Site::config('general', array('noExpire' => 'user'));
$response = $this->client->request('GET', '/');
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic