diff --git a/modules/user/user.test b/modules/user/user.test
index 6ecbfac..b11ac41 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -2169,3 +2169,49 @@ class UserValidateCurrentPassCustomForm extends DrupalWebTestCase {
     $this->assertText(t('The password has been validated and the form submitted successfully.'));
   }
 }
+
+/**
+ * Test case to test adding, editing, and deleting roles.
+ */
+class RoleEditTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Role edit',
+      'description' => 'Test role edit page.',
+      'group' => 'User',
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+    $this->admin_user = $this->drupalCreateUser(array('administer permissions', 'administer users'));
+  }
+
+  /**
+   * Test adding, editing, and deleting roles.
+   */
+  function testAddRole() {
+    $this->drupalLogin($this->admin_user);
+    $this->drupalGet('');
+
+    // Test adding a role.
+    $edit['name'] = $this->randomName();
+    $this->drupalPost('admin/people/permissions/roles', $edit, t('Add role'));
+    $this->assertText(t('The role has been added.'), t('Successful save message displayed.'));
+
+    // Test editing a role.
+    $role_id = mt_rand(3, count(user_roles()));
+    $edit['name'] = $this->randomName();
+    $this->drupalPost('admin/people/permissions/roles/edit/' . $role_id, $edit, t('Save role'));
+    $this->assertText(t('The role has been renamed.'), t('Successful editing message displayed.'));
+    $this->assertText($edit['name'], t('Edited role name successfully displayed'));
+
+    // Test deleting a role.
+    $role_id = mt_rand(3, count(user_roles()));
+    $this->drupalPost('admin/people/permissions/roles/edit/' . $role_id, $edit, t('Delete role'));
+    $this->drupalPost(NULL, array(), t('Delete'));
+    $this->assertNoRaw('admin/config/people/roles/edit/' . $role_id, t('Role edit link removed.'));
+    $this->assertText(t('The role has been deleted.'), t('Successful delete message displayed.'));
+   }
+}
\ No newline at end of file
