diff --git a/tests/password_policy.test b/tests/password_policy.test
index 584ea7e..023395e 100644
--- a/tests/password_policy.test
+++ b/tests/password_policy.test
@@ -425,3 +425,49 @@ class PasswordPolicyForcePasswordChangeTestCase extends DrupalWebTestCase {
     $this->assertNoRaw(t('An administrator has required that you change your password. You must change your password to proceed on the site.'), t('Not prompted to change password a 2nd time.'));
   }
 }
+
+class IssueQueueTestCase extends DrupalWebTestCase {
+  protected $admin_user;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Issue queue tests',
+      'description' => 'Tests specific issues from the Password Policy issue queue.',
+      'group' => 'Password Policy',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('password_policy');
+  }
+
+  //test specific to http://drupal.org/node/1335180 ("Assigning a policy to a role with same the numeric id causes 'Integrity constraint violation'")
+  public function testPolicyCreate() {
+    // Log in
+    $user = $this->drupalCreateUser(array('administer password policies'));
+    $this->drupalLogin($user);
+    // Create a policy
+    $policy_name = $this->randomName();
+    $edit = array(
+      'name' => $policy_name,
+      'roles[2]' => '2',
+    );
+    $this->drupalPost('admin/config/people/password_policy/add', $edit, t('Create'));
+    $this->assertText('Policy ' . $policy_name . ' has been created.', 'Policy ' . $policy_name . ' has been created');
+    // Enable newly created policy
+    $pid = db_query('SELECT pid FROM {password_policy} WHERE name = :name', array(':name' => $policy_name))->fetchField();
+    $constraints = unserialize(db_query('SELECT policy FROM {password_policy} WHERE pid = :pid', array(':pid' => $pid))->fetchField());
+    $edit = array(
+      "policies[$pid][enabled]" => $pid,
+    );
+    $this->drupalPost('admin/config/people/password_policy/list', $edit, t('Save changes'));
+    $this->assertText(t('The changes have been saved.'), t('Form submitted successfully.'));
+    $enabled = db_query('SELECT enabled FROM {password_policy} WHERE pid = :pid', array(':pid' => $pid))->fetchField();
+    $this->assertTrue($enabled == 1, t('Policy enabled.'));
+  }
+  
+  public function testPolicyCreateAgain() {
+    $this->testPolicyCreate();
+    $this->testPolicyCreate();
+  }
+}
