summaryrefslogtreecommitdiff
path: root/modules/field_ui/field_ui.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 02:22:01 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 02:22:01 +0000
commite5f48f0f780ac0ea08ecbf31c85f9bcdc80147ac (patch)
tree53338c4beb77d716f2905f0212883cc07af98ba0 /modules/field_ui/field_ui.test
parent02c1eeee3fc904ecc7845902cc11ba545dd9466b (diff)
downloadbrdo-e5f48f0f780ac0ea08ecbf31c85f9bcdc80147ac.tar.gz
brdo-e5f48f0f780ac0ea08ecbf31c85f9bcdc80147ac.tar.bz2
#680910 by yched and bjaspan: Allow fields to be restricted to entity types.
Diffstat (limited to 'modules/field_ui/field_ui.test')
-rw-r--r--modules/field_ui/field_ui.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test
index f14ed11c0..e3f030782 100644
--- a/modules/field_ui/field_ui.test
+++ b/modules/field_ui/field_ui.test
@@ -146,6 +146,11 @@ class FieldUITestCase extends DrupalWebTestCase {
$this->drupalGet(('admin/structure/types/manage/page/fields'));
$this->assertRaw(t('Add existing field'), t('"Add existing field" was found.'));
+ // Check that the list of options respects object type restrictions on
+ // fields. The 'comment' field is restricted to the 'comment' object type
+ // and should not appear in the list.
+ $this->assertFalse($this->xpath('//select[@id="edit--add-existing-field-field-name"]//option[@value="comment"]'), t('The list of options respects object type restrictions.'));
+
// Add a new field based on an existing field.
$edit = array(
'_add_existing_field[label]' => $this->field_label . '_2',