diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-27 19:46:39 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-27 19:46:39 +0000 |
commit | 8d4bd0c81465954ed8608c64f52c1281aa01f45d (patch) | |
tree | 3dad230305f604165b4258ee99418a4872e75337 /modules | |
parent | 6bc9c5868b553a5b3fbbcfcd35587ca25135de38 (diff) |
Update tests to reflect the fact that the admin group is gone.
Fix a bug in user::create(), found by the unit tests (hooray)!
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user/helpers/user.php | 4 | ||||
-rw-r--r-- | modules/user/tests/User_Installer_Test.php | 15 |
2 files changed, 5 insertions, 14 deletions
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 6c2cdeaa..e035a7fb 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -74,8 +74,8 @@ class user_Core { } $user->name = $name; - $user->display_name = $name; - $user->password = $name; + $user->display_name = $display_name; + $user->password = $password; $user->admin = $admin; $user->save(); diff --git a/modules/user/tests/User_Installer_Test.php b/modules/user/tests/User_Installer_Test.php index e3c6c7d6..acc5467f 100644 --- a/modules/user/tests/User_Installer_Test.php +++ b/modules/user/tests/User_Installer_Test.php @@ -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"), |