? storm--1042698-10.patch
? storm--1042698-12.patch
? storm--1042698-8.patch
Index: storm.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storm.module,v
retrieving revision 1.10.4.62
diff -u -p -r1.10.4.62 storm.module
--- storm.module	16 Dec 2010 23:32:22 -0000	1.10.4.62
+++ storm.module	19 Feb 2011 16:36:56 -0000
@@ -709,7 +709,7 @@ function storm_icon($icon, $title) {
 
   if (variable_get('storm_icons_display', TRUE) == TRUE) {
     $available = cache_get('storm:icons');
-    if ($available == 0) {
+    if (!is_object($available)) {
       // Cache miss
       $available = storm_icon_recache();
     }
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	19 Feb 2011 16:36:56 -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.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormattribute/stormattribute.admin.inc,v
retrieving revision 1.5.4.18
diff -u -p -r1.5.4.18 stormattribute.admin.inc
--- stormattribute/stormattribute.admin.inc	15 Sep 2010 20:55:21 -0000	1.5.4.18
+++ stormattribute/stormattribute.admin.inc	19 Feb 2011 16:36:56 -0000
@@ -44,19 +44,19 @@ function stormattribute_list() {
   $args = array();
   $filterfields = array();
 
-  if ($_SESSION['stormattribute_list_filter']['domain']) {
+  if (isset($_SESSION['stormattribute_list_filter']['domain'])) {
     $where[] = "domain='%s'";
     $args[] = $_SESSION['stormattribute_list_filter']['domain'];
     $filterfields[] = t('Domain');
   }
 
-  if ($_SESSION['stormattribute_list_filter']['akey']) {
+  if (isset($_SESSION['stormattribute_list_filter']['akey'])) {
     $where[] = "LOWER(akey) LIKE LOWER('%s')";
     $args[] = $_SESSION['stormattribute_list_filter']['akey'];
     $filterfields[] = t('Key');
   }
 
-  if ($_SESSION['stormattribute_list_filter']['avalue']) {
+  if (isset($_SESSION['stormattribute_list_filter']['avalue'])) {
     $where[] = "LOWER(avalue) LIKE LOWER('%s')";
     $args[] = $_SESSION['stormattribute_list_filter']['avalue'];
     $filterfields[] = t('Value');
@@ -74,10 +74,7 @@ function stormattribute_list() {
     $filterfields[] = t('Default');
   }
   
-  $itemsperpage = $_SESSION['stormattribute_list_filter']['itemsperpage'];
-  if (!$itemsperpage) {
-    $itemsperpage = variable_get('storm_default_items_per_page', 10);
-  }
+  $itemsperpage = isset($_SESSION['stormattribute_list_filter']['itemsperpage']) ? $_SESSION['stormattribute_list_filter']['itemsperpage'] : variable_get('storm_default_items_per_page', 10);
 
   $tablesort = tablesort_sql($header);
 
@@ -189,17 +186,14 @@ function stormattribute_list_submit($for
 }
 
 function stormattribute_list_filter(&$form_state, $filterdesc = 'Filter') {
-  $domain = $_SESSION['stormattribute_list_filter']['domain'];
-  $akey = $_SESSION['stormattribute_list_filter']['akey'];
-  $avalue = $_SESSION['stormattribute_list_filter']['avalue'];
-  $isactive = $_SESSION['stormattribute_list_filter']['isactive'];
-  $isdefault = $_SESSION['stormattribute_list_filter']['isdefault'];
-
-  $itemsperpage = $_SESSION['stormattribute_list_filter']['itemsperpage'];
-  if (!$itemsperpage) {
-    $itemsperpage = variable_get('storm_default_items_per_page', 10);
-    $_SESSION['stormattribute_list_filter']['itemsperpage'] = $itemsperpage;
-  }
+  $domain = isset($_SESSION['stormattribute_list_filter']['domain']) ? $_SESSION['stormattribute_list_filter']['domain'] : '';
+  $akey = isset($_SESSION['stormattribute_list_filter']['akey']) ? $_SESSION['stormattribute_list_filter']['akey'] : '';
+  $avalue = isset($_SESSION['stormattribute_list_filter']['avalue']) ? $_SESSION['stormattribute_list_filter']['avalue'] : '';
+  $isactive = isset($_SESSION['stormattribute_list_filter']['isactive']) ? $_SESSION['stormattribute_list_filter']['isactive'] : TRUE;
+  $isdefault = isset($_SESSION['stormattribute_list_filter']['isdefault']) ? $_SESSION['stormattribute_list_filter']['isdefault'] : FALSE;
+
+  $itemsperpage = isset($_SESSION['stormattribute_list_filter']['itemsperpage']) ? $_SESSION['stormattribute_list_filter']['itemsperpage'] : variable_get('storm_default_items_per_page', 10);
+  $_SESSION['stormattribute_list_filter']['itemsperpage'] = $itemsperpage;
 
   $form['filter'] = array(
     '#type' => 'fieldset',
@@ -395,17 +389,17 @@ function stormattribute_form($attribute 
   drupal_set_breadcrumb($breadcrumb);
 
   if (arg(2)=='add') {
-    if (array_key_exists('domain', $_GET) && !$attribute->domain) {
+    if (array_key_exists('domain', $_GET) && !isset($attribute->domain)) {
       $attribute->domain = $_GET['domain'];
     }
 
-    if ($_SESSION['stormattribute_list_filter']['domain'] && !$attribute->domain) {
+    if (isset($_SESSION['stormattribute_list_filter']['domain']) && !isset($attribute->domain)) {
       $attribute->domain = $_SESSION['stormattribute_list_filter']['domain'];
     }
   }
 
   $form = array();
-  if ($attribute->aid) {
+  if (isset($attribute->aid)) {
     $form['aid'] = array(
       '#type' => 'value',
       '#value' => $attribute->aid,
@@ -421,7 +415,7 @@ function stormattribute_form($attribute 
     '#type' => 'textfield',
     '#title' => t('Domain'),
     '#required' => TRUE,
-    '#default_value' => $attribute->domain,
+    '#default_value' => isset($attribute->domain) ? $attribute->domain : '',
     '#autocomplete_path' => 'storm/attributes/domain/autocomplete',
     '#size' => 40,
   );
@@ -435,7 +429,7 @@ function stormattribute_form($attribute 
     '#type' => 'select',
     '#title' => t('Parent domain'),
     '#required' => FALSE,
-    '#default_value' => $attribute->parent_domain,
+    '#default_value' => isset($attribute->parent_domain) ? $attribute->parent_domain : '',
     '#options' => array(''=>'-') + $domains,
   );
 
@@ -448,7 +442,7 @@ function stormattribute_form($attribute 
     '#type' => 'textfield',
     '#title' => t('Key'),
     '#required' => TRUE,
-    '#default_value' => $attribute->akey,
+    '#default_value' => isset($attribute->akey) ? $attribute->akey : '',
     '#size' => 25,
     '#maxlength' => 100,
   );
@@ -457,14 +451,14 @@ function stormattribute_form($attribute 
     '#type' => 'textfield',
     '#title' => t('Value'),
     '#required' => TRUE,
-    '#default_value' => $attribute->avalue,
+    '#default_value' => isset($attribute->avalue) ? $attribute->avalue : '',
     '#size' => 25,
   );
 
   $form['group2']['weight'] = array(
     '#type' => 'weight',
     '#title' => t('Weight'),
-    '#default_value' => $attribute->weight,
+    '#default_value' => isset($attribute->weight) ? $attribute->weight : 0,
   );
 
   $form['group3'] = array(
@@ -475,13 +469,13 @@ function stormattribute_form($attribute 
   $form['group3']['isactive'] = array(
     '#type' => 'checkbox',
     '#title' => t('Active'),
-    '#default_value' => $attribute->isactive,
+    '#default_value' => isset($attribute->isactive) ? $attribute->isactive : TRUE,
   );
 
   $form['group3']['isdefault'] = array(
     '#type' => 'checkbox',
     '#title' => t('Default'),
-    '#default_value' => $attribute->isdefault,
+    '#default_value' => isset($attribute->isdefault) ? $attribute->isdefault : FALSE,
   );
 
   $form['save'] = array(
@@ -489,7 +483,7 @@ function stormattribute_form($attribute 
     '#value' => t('Save')
   );
 
-  if ($attribute->aid) {
+  if (isset($attribute->aid)) {
     $form['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
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	19 Feb 2011 16:36:56 -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".'));
+  }
+}
Index: stormexpense/stormexpense.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormexpense/Attic/stormexpense.test,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 stormexpense.test
--- stormexpense/stormexpense.test	1 Feb 2011 22:12:54 -0000	1.1.2.2
+++ stormexpense/stormexpense.test	19 Feb 2011 16:36:56 -0000
@@ -13,6 +13,21 @@ class StormexpenseTestCase extends Drupa
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask', 'stormticket', 'stormexpense');
   }
 
+  public function testStormexpenseAccess() {
+    $this->drupalGet('storm/expenses');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Expense list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/expenses');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Expense list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm expense: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/expenses');
+    $this->assertText(t('Expenses'), t('Make sure the correct page has been displayed by checking that the title is "Expenses".'));
+  }
+
   public function testStormexpenseCreate() {
     // Create and login user
     $user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm expense: add', 'Storm expense: view all', 'Storm project: view all', 'Storm task: view all'));
Index: storminvoice/storminvoice.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storminvoice/Attic/storminvoice.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 storminvoice.test
--- storminvoice/storminvoice.test	16 Apr 2010 14:55:01 -0000	1.1.2.1
+++ storminvoice/storminvoice.test	19 Feb 2011 16:36:57 -0000
@@ -13,6 +13,21 @@ class StorminvoiceTestCase extends Drupa
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'storminvoice');
   }
 
+  public function testStorminvoiceAccess() {
+    $this->drupalGet('storm/invoices');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Invoices list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/invoices');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Invoices list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm invoice: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/invoices');
+    $this->assertText(t('Invoices'), t('Make sure the correct page has been displayed by checking that the title is "Invoices".'));
+  }
+
   public function testStorminvoiceCreate() {
     // Create and login user
     $user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm invoice: add', 'Storm invoice: view all'));
Index: stormknowledgebase/stormknowledgebase.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormknowledgebase/stormknowledgebase.test,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 stormknowledgebase.test
--- stormknowledgebase/stormknowledgebase.test	4 Feb 2010 13:39:27 -0000	1.1.2.2
+++ stormknowledgebase/stormknowledgebase.test	19 Feb 2011 16:36:57 -0000
@@ -16,7 +16,22 @@ Knowledge base module',
     $privileged_user = $this->drupalCreateUser(array('Storm knowledgebase: add'));
     $this->drupalLogin($privileged_user);
   }
-  
+
+  public function testStormknowledgebaseAccess() {
+    $this->drupalGet('storm/knowledgebase');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Knowledgebase list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/knowledgebase');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Knowledgebase list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm knowledgebase: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/knowledgebase');
+    $this->assertText(t('Knowledge base'), t('Make sure the correct page has been displayed by checking that the title is "Knowledge base".'));
+  }
+
   public function testStormknowledgebaseCreate() {
     $edit = array(
       'title' => $this->randomName(32),
Index: stormnote/stormnote.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormnote/Attic/stormnote.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 stormnote.test
--- stormnote/stormnote.test	21 Dec 2010 22:14:19 -0000	1.1.2.1
+++ stormnote/stormnote.test	19 Feb 2011 16:36:57 -0000
@@ -13,6 +13,21 @@ class StormnoteTestCase extends DrupalWe
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask', 'stormnote');
   }
 
+  public function testStormnoteAccess() {
+    $this->drupalGet('storm/notes');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Notes list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/notes');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Notes list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm note: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/notes');
+    $this->assertText(t('Notes'), t('Make sure the correct page has been displayed by checking that the title is "Notes".'));
+  }
+
   public function testStormnoteCreate() {
     // 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', 'Storm note: add', 'Storm note: view all'));
Index: stormorganization/stormorganization.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormorganization/stormorganization.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 stormorganization.test
--- stormorganization/stormorganization.test	31 Jan 2010 17:11:55 -0000	1.1.2.1
+++ stormorganization/stormorganization.test	19 Feb 2011 16:36:57 -0000
@@ -1,5 +1,5 @@
 <?php
-class StormorganisationTestCase extends DrupalWebTestCase {
+class StormorganizationTestCase extends DrupalWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -16,6 +16,21 @@ Organization module',
     $this->drupalLogin($privileged_user);
   }
 
+  public function testStormorganizationAccess() {
+    $this->drupalGet('storm/organizations');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Organizations list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/organizations');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Organizations list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm organization: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/organizations');
+    $this->assertText(t('Organizations'), t('Make sure the correct page has been displayed by checking that the title is "Organizations".'));
+  }
+
   public function testStormorganizationCreate() {
     $edit = array(
       'title' => $this->randomName(32),
Index: stormperson/stormperson.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormperson/Attic/stormperson.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 stormperson.test
--- stormperson/stormperson.test	8 Jan 2011 14:50:59 -0000	1.1.2.1
+++ stormperson/stormperson.test	19 Feb 2011 16:36:57 -0000
@@ -16,6 +16,21 @@ Person module',
     $this->drupalLogin($privileged_user);
   }
 
+  public function testStormpersonAccess() {
+    $this->drupalGet('storm/people');
+    $this->assertResponse(403, t('Make sure access is denied to Storm People list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/people');
+    $this->assertResponse(403, t('Make sure access is denied to Storm People list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm person: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/people');
+    $this->assertText(t('People'), t('Make sure the correct page has been displayed by checking that the title is "People".'));
+  }
+
   public function testStormpersonCreate() {
     $org = array(
       'title' => $this->randomName(32),
Index: stormproject/stormproject.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormproject/Attic/stormproject.test,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 stormproject.test
--- stormproject/stormproject.test	17 Aug 2010 23:25:36 -0000	1.1.2.3
+++ stormproject/stormproject.test	19 Feb 2011 16:36:57 -0000
@@ -13,6 +13,21 @@ class StormprojectTestCase extends Drupa
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject');
   }
 
+  public function testStormprojectAccess() {
+    $this->drupalGet('storm/projects');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Projects list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/projects');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Projects list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm project: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/projects');
+    $this->assertText(t('Projects'), t('Make sure the correct page has been displayed by checking that the title is "Projects".'));
+  }
+
   public function testStormprojectCreate() {
     // Create and login user
     $user = $this->drupalCreateUser(array('Storm organization: add', 'Storm organization: view all', 'Storm project: add', 'Storm project: view all'));
Index: stormtask/stormtask.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormtask/Attic/stormtask.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 stormtask.test
--- stormtask/stormtask.test	23 Aug 2010 17:12:04 -0000	1.1.2.1
+++ stormtask/stormtask.test	19 Feb 2011 16:36:57 -0000
@@ -13,6 +13,21 @@ class StormtaskTestCase extends DrupalWe
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask');
   }
 
+  public function testStormtaskAccess() {
+    $this->drupalGet('storm/tasks');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Tasks list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/tasks');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Tasks list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm task: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/tasks');
+    $this->assertText(t('Tasks'), t('Make sure the correct page has been displayed by checking that the title is "Tasks".'));
+  }
+
   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'));
Index: stormticket/stormticket.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormticket/Attic/stormticket.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 stormticket.test
--- stormticket/stormticket.test	15 Sep 2010 21:38:44 -0000	1.1.2.1
+++ stormticket/stormticket.test	19 Feb 2011 16:36:57 -0000
@@ -13,6 +13,21 @@ class StormticketTestCase extends Drupal
     parent::setUp('storm', 'stormattribute', 'stormorganization', 'stormproject', 'stormtask', 'stormticket');
   }
 
+  public function testStormticketAccess() {
+    $this->drupalGet('storm/tickets');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Tickets list for anonymous user'));
+
+    $basic_user = $this->drupalCreateUser();
+    $this->drupalLogin($basic_user);
+    $this->drupalGet('storm/tickets');
+    $this->assertResponse(403, t('Make sure access is denied to Storm Tickets list for basic user'));
+
+    $privileged_user = $this->drupalCreateUser(array('Storm ticket: access'));
+    $this->drupalLogin($privileged_user);
+    $this->drupalGet('storm/tickets');
+    $this->assertText(t('Tickets'), t('Make sure the correct page has been displayed by checking that the title is "Tickets".'));
+  }
+
   public function testStormticketCreate() {
     // 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', 'Storm ticket: add', 'Storm ticket: view all'));
