Update tests to reflect the fact that the admin group is gone.

Fix a bug in user::create(), found by the unit tests (hooray)!
This commit is contained in:
Bharat Mediratta
2008-11-27 19:46:39 +00:00
parent 6bc9c5868b
commit 8d4bd0c814
2 changed files with 5 additions and 14 deletions

View File

@@ -30,22 +30,13 @@ class User_Installer_Test extends Unit_Test_Case {
$this->assert_true(user::is_correct_password($user, "admin"));
$this->assert_equal(
array("administrator", "registered"),
array("Registered Users"),
array_keys($user->groups->select_list("name")));
}
public function install_creates_admininstrator_group_test() {
$group = ORM::factory("group", 1);
$this->assert_equal("administrator", $group->name);
$this->assert_equal(
array("admin"),
array_keys($group->users->select_list("name")));
}
public function install_creates_registered_group_test() {
$group = ORM::factory("group", 2);
$this->assert_equal("registered", $group->name);
$group = ORM::factory("group", 1);
$this->assert_equal("Registered Users", $group->name);
$this->assert_equal(
array("admin", "joe"),