? storm.test.patch
Index: storm.test
===================================================================
RCS file: storm.test
diff -N storm.test
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ storm.test	30 Jun 2010 15:20:30 -0000
@@ -0,0 +1,36 @@
+<?php
+// $Id: storm.test,v 1.1.2.2 2010/03/19 12:05:46 juliangb Exp $
+
+/**
+ * @file
+ * Tests for the Storm module
+ */
+class StormTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Storm functionality',
+      'description' => 'Test the functionality of the Storm base module',
+      'group' => 'Storm',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('storm');
+  }
+
+  public function testStormAccess() {
+    $this->drupalGet('storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm dashboard for anonymous user'));
+    
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm dashboard for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm: access dashboard'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm');
+    $this->assertText(t('Storm Dashboard'), t('Make sure the correct page has been displayed by checking that the title is "Storm Dashboard".'));
+  }
+}
+
