summaryrefslogtreecommitdiff
path: root/core/tests
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-04-05 16:57:51 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-04-05 16:57:51 +0000
commitf1eec57221f9bca047ff8d422ade1e26df0fa233 (patch)
tree8d271693657c7383be277742caaeaa9a81ccde9d /core/tests
parent15fc9b9399ede22879c5f5a6ff95d058986d0278 (diff)
Add a weight column to the items model. Change the album ordering to
use this as the default instead of id. This prepares the way for manual reordering in the organize functionality.
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/Albums_Controller_Test.php2
-rw-r--r--core/tests/ORM_MPTT_Test.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/tests/Albums_Controller_Test.php b/core/tests/Albums_Controller_Test.php
index b43ae01b..747b7427 100644
--- a/core/tests/Albums_Controller_Test.php
+++ b/core/tests/Albums_Controller_Test.php
@@ -31,7 +31,7 @@ class Albums_Controller_Test extends Unit_Test_Case {
$_POST["name"] = "new name";
$_POST["title"] = "new title";
$_POST["description"] = "new description";
- $_POST["column"] = "id";
+ $_POST["column"] = "weight";
$_POST["direction"] = "ASC";
$_POST["csrf"] = access::csrf_token();
$_POST["_method"] = "put";
diff --git a/core/tests/ORM_MPTT_Test.php b/core/tests/ORM_MPTT_Test.php
index 2aeea58c..f443862b 100644
--- a/core/tests/ORM_MPTT_Test.php
+++ b/core/tests/ORM_MPTT_Test.php
@@ -29,7 +29,7 @@ class ORM_MPTT_Test extends Unit_Test_Case {
$album = ORM::factory("item");
$album->type = "album";
$album->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
- $album->sort_column = "id";
+ $album->sort_column = "weight";
$album->sort_order = "ASC";
$album->add_to_parent($root);
@@ -155,7 +155,7 @@ class ORM_MPTT_Test extends Unit_Test_Case {
$parent = ORM::factory("item");
$parent->type = "album";
$parent->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
- $parent->sort_column = "id";
+ $parent->sort_column = "weight";
$parent->sort_order = "ASC";
$parent->add_to_parent($root);
@@ -166,7 +166,7 @@ class ORM_MPTT_Test extends Unit_Test_Case {
$album1 = ORM::factory("item");
$album1->type = "album";
$album1->rand_key = ((float)mt_rand()) / (float)mt_getrandmax();
- $album1->sort_column = "id";
+ $album1->sort_column = "weight";
$album1->sort_order = "ASC";
$album1->add_to_parent($parent);