Index: stormtask/stormtask.test
===================================================================
RCS file: stormtask/stormtask.test
diff -N stormtask/stormtask.test
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stormtask/stormtask.test	17 Aug 2010 23:08:43 -0000
@@ -0,0 +1,40 @@
+<?php
+class StormtaskTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => t('Storm Task Functionality'),
+      'description' => t('Test the functionality of the Storm Task module'),
+      'group' => 'Storm',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask');
+  }
+
+  public function testStormtaskCreate() {
+    // Create and login user
+    $user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm project: add', 'Storm project: view all', 'Storm task: add', 'Storm task: view all'));
+    $this->drupalLogin($user);
+  
+    // Create organization and invoice
+    $org = array(
+      'title' => $this->randomName(32),
+      'body' => $this->randomName(64),
+    );
+    $prj = array(
+      'title' => $this->randomName(32),
+      'organization_nid' => '1',
+    );
+    $task = array(
+      'title' => $this->randomName(32),
+      'body' => $this->randomName(64),
+    );
+    $this->drupalPost('node/add/stormorganization', $org, t('Save'));
+    $this->drupalPost('node/add/stormproject', $prj, t('Save'));
+    $this->drupalPost('node/add/stormtask', $task, t('Save'));
+
+    $this->assertText(t('Task @title has been created.', array('@title' => $task['title'])));;
+  }
+}

