? storm--332555-23b.patch
? storm--918758-1.patch
Index: stormperson/stormperson.test
===================================================================
RCS file: stormperson/stormperson.test
diff -N stormperson/stormperson.test
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stormperson/stormperson.test	5 Jan 2011 23:58:53 -0000
@@ -0,0 +1,33 @@
+<?php
+class StormpersonTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Storm Person functionality',
+      'description' => 'Test the functionality of the Storm 
+Person module',
+      'group' => 'Storm',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormperson');
+    $privileged_user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm person: add'));
+    $this->drupalLogin($privileged_user);
+  }
+
+  public function testStormpersonCreate() {
+    $org = array(
+      'title' => $this->randomName(32),
+      'body' => $this->randomName(64),
+    );
+    $person = array(
+      'title' => $this->randomName(32),
+      'body' => $this->randomName(64),
+    );
+    
+    $this->drupalPost('node/add/stormorganization', $org, t('Save'));
+    $this->drupalPost('node/add/stormperson', $person, t('Save'));
+    $this->assertText(t('Person @title has been created.', array('@title' => $person['title'])));
+  }
+}
