diff --git a/user_relationship_node_access/tests/user_relationship_node_access.test b/user_relationship_node_access/tests/user_relationship_node_access.test
new file mode 100644
index 0000000..d92d16e
--- /dev/null
+++ b/user_relationship_node_access/tests/user_relationship_node_access.test
@@ -0,0 +1,149 @@
+<?php
+/**
+ * @file
+ * User Relationships Node Access Tests
+ */
+class URNodeAccessTestCase extends DrupalWebTestCase {
+
+  //test users
+  var $users = array();
+  //test relationship types
+  var $rtypes = array();
+  /**
+   * getInfo() returns properties that are displayed in the test selection form.
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'User Relationship Node Access',
+      'description' => 'Test User Relationships Node Access grants system',
+      'group' => 'User Relationships',
+    );
+  }
+  /**
+   * Enable modules.
+   */
+  function setUp() {
+    parent::setUp('user_relationships_api','user_relationship_node_access','user_relationships_ui');
+    $this->users = array();
+    $this->rtypes = array();
+    $this->nodes = array();
+
+    //clear cache
+    user_relationships_types_load(TRUE);
+
+    $rtype = new StdClass;
+    $rtype->name = 'oneway';
+    $rtype->plural_name = 'oneways';
+    $rtype->is_oneway = TRUE;
+    $rtype->requires_approval = FALSE;
+    $rtype->expires_val = 0;
+    user_relationships_type_save($rtype);
+    $this->rtypes['oneway'] = $rtype;
+
+    unset($rtype);
+    $rtype = new StdClass;
+    $rtype->name = 'twoway';
+    $rtype->plural_name = 'twoways';
+    $rtype->is_oneway = FALSE;
+    $rtype->requires_approval = FALSE;
+    $rtype->expires_val = 0;
+    user_relationships_type_save($rtype);
+    $this->rtypes['twoway'] = $rtype;
+
+    //clear cache
+    user_relationships_types_load(TRUE);
+
+    //minimal perms
+    $u1 = $this->drupalCreateUser(array('access content','can have relationships'));
+    $this->users['u1'] = $u1;
+    //can grant delete
+    $u2 = $this->drupalCreateUser(array('grant delete permission to related users','access content','create page content','can have relationships'));
+    $this->users['u2'] = $u2;
+    //can grant update
+    $u3 = $this->drupalCreateUser(array('grant update permission to related users','access content','create page content','can have relationships'));
+    $this->users['u3'] = $u3;
+    //can grant view
+    $u4 = $this->drupalCreateUser(array('grant view permission to related users','access content','create page content','can have relationships'));
+    $this->users['u4'] = $u4;
+
+    //admin
+    $admin = $this->drupalCreateUser(array('administer user relationships','access administration pages','administer nodes'));
+    $this->users['admin'] = $admin;
+
+    //basically user 1 has every kind of relationships with everybody
+    user_relationships_request_relationship($u1, $u2, $this->rtypes['oneway']->rtid, TRUE);
+    user_relationships_request_relationship($u1, $u3, $this->rtypes['oneway']->rtid, TRUE);
+    //them to you
+    user_relationships_request_relationship($u4, $u1, $this->rtypes['oneway']->rtid, TRUE);
+
+    user_relationships_request_relationship($u1, $u2, $this->rtypes['twoway']->rtid, TRUE);
+    user_relationships_request_relationship($u1, $u3, $this->rtypes['twoway']->rtid, TRUE);
+    //them to you
+    user_relationships_request_relationship($u4, $u1, $this->rtypes['twoway']->rtid, TRUE);
+
+    //Manually apply the proper type settings
+    $this->drupalLogin($this->users['admin']);
+    $this->drupalPost('admin/content/node-settings/rebuild',null,'Rebuild permissions');
+
+    $type_settings = array('user_relationship_node_access_allowed_types[page]'=>TRUE);
+    $this->drupalPost('admin/content/user_relationship_node_access',$type_settings,'Save configuration');
+    $this->drupalLogout($this->users['admin']);
+  }
+
+  function testURNodeAccessDelete() {
+    //this needs to check one-way and two way different logic for each in terms of messages anyway
+    $this->drupalLogin($this->users['u2']);
+    $node = array();
+    $node['title'] = $this->randomName(8);
+    $node['body'] = $this->randomName(16);
+    $node['user_relationship_node_access[delete][1_ty]'] = TRUE;
+    $node['user_relationship_node_access[delete][2]'] = TRUE;
+    $this->drupalPost('node/add/page', $node, t('Save'));
+    $this->drupalLogout($this->users['u2']);
+
+    //can my relation delete after they log in?
+    $this->drupalLogin($this->users['u1']);
+    //I know the nid will be 1, but how do I find this dynamically???
+    $this->drupalPost("node/1/delete",null,t('Delete'));
+    $this->drupalLogout($this->users['u1']);
+  }
+
+  function testURNodeAccessUpdate() {
+    $this->drupalLogin($this->users['u3']);
+    $node = array();
+    $node['title'] = $this->randomName(8);
+    $node['body'] = $this->randomName(16);
+    $node['user_relationship_node_access[update][1_yt]'] = TRUE;
+    $node['user_relationship_node_access[update][2]'] = TRUE;
+    $this->drupalPost('node/add/page', $node, t('Save'));
+    $this->drupalLogout($this->users['u3']);
+
+    //can my relation update after they log in?
+    $this->drupalLogin($this->users['u1']);
+    $edit['title'] = 'foo';
+    $edit['body'] = 'bar';
+    $this->drupalPost("node/1/edit",$edit,t('Save'));
+    $this->drupalLogout($this->users['u1']);
+  }
+
+  function testURNodeAccessView() {
+    //this needs to check one-way and two way different logic for each in terms of messages anyway
+    $this->drupalLogin($this->users['u4']);
+    $node = array();
+    $node['title'] = $this->randomName(8);
+    $node['body'] = $this->randomName(16);
+    $node['user_relationship_node_access[view][1_ty]'] = TRUE;
+    $node['user_relationship_node_access[view][2]'] = TRUE;
+    $this->drupalPost('node/add/page', $node, t('Save'));
+    $this->drupalLogout($this->users['u4']);
+
+    $this->drupalLogin($this->users['u1']);
+    $this->drupalGet('node/1');
+    $this->drupalLogout($this->users['u1']);
+  }
+
+  function tearDown() {
+    unset($this->rtypes);
+    parent::tearDown();
+  }
+}
