? storm--1042698-8.patch
Index: storm.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storm.test,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 storm.test
--- storm.test	19 Mar 2010 12:05:46 -0000	1.1.2.2
+++ storm.test	18 Feb 2011 20:55:18 -0000
@@ -32,5 +32,25 @@ class StormTestCase extends DrupalWebTes
     $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".'));
   }
-}
 
+  public function testStormAccessSettings() {
+    $this->drupalGet('admin/settings/storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm settings page for anonymous user'));
+    $this->drupalGet('admin/settings/storm/storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm settings page for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('admin/settings/storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm settings page for basic user'));
+    $this->drupalGet('admin/settings/storm/storm');
+    $this->assertResponse(403, t('Make sure access is denied to Storm settings page for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm: access administration pages'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('admin/settings/storm');
+    $this->assertText(t('Storm'), t('Make sure the correct page has been displayed by checking that the title of the settings page is "Storm".'));
+    $this->drupalGet('admin/settings/storm/storm');
+    $this->assertText(t('Storm'), t('Make sure the correct page has been displayed by checking that the title of the settings page is "Storm".'));
+  }
+}
Index: stormattribute/stormattribute.test
===================================================================
RCS file: stormattribute/stormattribute.test
diff -N stormattribute/stormattribute.test
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ stormattribute/stormattribute.test	18 Feb 2011 20:55:18 -0000
@@ -0,0 +1,41 @@
+<?php
+// $Id:$
+
+/**
+ * @file
+ * Tests for the Storm Attribute module
+ */
+class StormattributeTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Storm Attribute functionality',
+      'description' => 'Test the functionality of the Storm Attribute module',
+      'group' => 'Storm',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('storm', 'stormattribute');
+  }
+
+  public function testStormattributeAccess() {
+    $this->drupalGet('storm/attributes');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Attributes list for anonymous user'));
+    $this->drupalGet('storm/attributes/add');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Attributes form for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/attributes');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Attributes list for basic user'));
+    $this->drupalGet('storm/attributes/add');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Attributes form for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm: access administration pages'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/attributes');
+    $this->assertText(t('Attributes'), t('Make sure the correct page has been displayed by checking that the title is "Attributes".'));
+    $this->drupalGet('storm/attributes/add');
+    $this->assertText(t('Add a new attribute'), t('Make sure the correct page has been displayed by checking that the title is "Add a new attribute".'));
+  }
+}
