var helpers = require('../actions/helpers');
var actions = require('../actions');
var test = require('tape');

test('use shorthand helpers', function(t) {
  t.equal(helpers.useKey('add_path'), 'add_web_path');
  t.equal(helpers.useKey('create_asset'), 'create_asset');
  t.end();
});

test('join asset type with id', function(t) {
  t.equal(helpers.asset('Site', '1'), 'Site_1');
  t.end();
});

test('create action ids', function(t) {
  t.equal(
    actions.getActionId('add_path', 'Site_1'),
    'add_Site_1_path'
  );
  t.equal(
    actions.getActionId('create_link', 1, 2),
    'link_notice_1_to_2'
  );
  t.equal(
    actions.getActionId('set_attribute', 'name', 'Site_1'),
    'set_Site_1_name'
  );
  t.equal(
    actions.getActionId('set_attribute', 'cache_globally', 'Site_1'),
    'set_Site_1_not_found_page_cache_globally'
  );
  t.end();
});


@@ -200,16 +200,38 @@
 eb_path'
+, 'shorthand selector'
 );%0A  t.e
@@ -281,16 +281,62 @@
 e_asset'
+, 'passthrough when no shortahnd is available'
 );%0A  t.e
@@ -576,16 +576,42 @@
 _1_path'
+,%0A    'add path action id'
 %0A  );%0A  
@@ -689,16 +689,45 @@
 _1_to_2'
+,%0A    'create link action id'
 %0A  );%0A  
@@ -816,16 +816,47 @@
 _1_name'
+,%0A    'set attribute action id'
 %0A  );%0A  
@@ -897,94 +897,88 @@
 set_
-attribute', 'cache_globally', 'Site_1'),%0A    'set_Site_1_not_found_page_cache_globally
+permission', 1, 1, 2),%0A    'set_permission_1_1_2',%0A    'set permission action id
 '%0A  

Update tests