Built motion from commit 5e31ea4.|0.0.32
[motion.git] / server / api / salesforce_configuration / index.spec.js
index f854643..0d1e211 100644 (file)
@@ -1 +1,97 @@
-var _0x7c3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x50\x72\x65\x73\x65\x72\x76\x65\x43\x61\x63\x68\x65","\x70\x72\x6F\x78\x79\x71\x75\x69\x72\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x64\x65\x73\x74\x72\x6F\x79","\x73\x70\x79","\x2E\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x41\x50\x49\x20\x52\x6F\x75\x74\x65\x72\x3A","\x73\x68\x6F\x75\x6C\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x6E\x20\x65\x78\x70\x72\x65\x73\x73\x20\x72\x6F\x75\x74\x65\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65","\x65\x71\x75\x61\x6C","\x74\x6F","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x69\x6E\x64\x65\x78","\x63\x61\x6C\x6C\x65\x64\x4F\x6E\x63\x65","\x62\x65\x65\x6E","\x68\x61\x76\x65","\x2F","\x77\x69\x74\x68\x41\x72\x67\x73","\x67\x65\x74","\x47\x45\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x50\x4F\x53\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x50\x55\x54\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x50\x41\x54\x43\x48\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2E\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65"];_0x7c3d[0];var proxyquire=require(_0x7c3d[2])[_0x7c3d[1]]();var salesforceConfigurationCtrlStub={index:_0x7c3d[3],show:_0x7c3d[4],create:_0x7c3d[5],update:_0x7c3d[6],destroy:_0x7c3d[7]};var routerStub={get:sinon[_0x7c3d[8]](),put:sinon[_0x7c3d[8]](),patch:sinon[_0x7c3d[8]](),post:sinon[_0x7c3d[8]](),delete:sinon[_0x7c3d[8]]()};var salesforceConfigurationIndex=proxyquire(_0x7c3d[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":salesforceConfigurationCtrlStub});describe(_0x7c3d[10],function(){it(_0x7c3d[11],function(){expect(salesforceConfigurationIndex)[_0x7c3d[13]][_0x7c3d[12]](routerStub)});describe(_0x7c3d[14],function(){it(_0x7c3d[15],function(){expect(routerStub[_0x7c3d[21]][_0x7c3d[20]](_0x7c3d[19],_0x7c3d[3]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});describe(_0x7c3d[22],function(){it(_0x7c3d[23],function(){expect(routerStub[_0x7c3d[21]][_0x7c3d[20]](_0x7c3d[24],_0x7c3d[4]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});describe(_0x7c3d[25],function(){it(_0x7c3d[26],function(){expect(routerStub[_0x7c3d[27]][_0x7c3d[20]](_0x7c3d[19],_0x7c3d[5]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});describe(_0x7c3d[28],function(){it(_0x7c3d[29],function(){expect(routerStub[_0x7c3d[30]][_0x7c3d[20]](_0x7c3d[24],_0x7c3d[6]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});describe(_0x7c3d[31],function(){it(_0x7c3d[29],function(){expect(routerStub[_0x7c3d[32]][_0x7c3d[20]](_0x7c3d[24],_0x7c3d[6]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});describe(_0x7c3d[33],function(){it(_0x7c3d[34],function(){expect(routerStub[_0x7c3d[35]][_0x7c3d[20]](_0x7c3d[24],_0x7c3d[7]))[_0x7c3d[13]][_0x7c3d[18]][_0x7c3d[17]][_0x7c3d[16]]})});});
\ No newline at end of file
+'use strict';
+
+var proxyquire = require('proxyquire').noPreserveCache();
+
+var salesforceConfigurationCtrlStub = {
+  index: 'salesforceConfigurationCtrl.index',
+  show: 'salesforceConfigurationCtrl.show',
+  create: 'salesforceConfigurationCtrl.create',
+  update: 'salesforceConfigurationCtrl.update',
+  destroy: 'salesforceConfigurationCtrl.destroy'
+};
+
+var routerStub = {
+  get: sinon.spy(),
+  put: sinon.spy(),
+  patch: sinon.spy(),
+  post: sinon.spy(),
+  delete: sinon.spy()
+};
+
+// require the index with our stubbed out modules
+var salesforceConfigurationIndex = proxyquire('./index.js', {
+  'express': {
+    Router: function() {
+      return routerStub;
+    }
+  },
+  './salesforce_configuration.controller': salesforceConfigurationCtrlStub
+});
+
+describe('SalesforceConfiguration API Router:', function() {
+
+  it('should return an express router instance', function() {
+    expect(salesforceConfigurationIndex).to.equal(routerStub);
+  });
+
+  describe('GET /api/salesforce/configurations', function() {
+
+    it('should route to salesforceConfiguration.controller.index', function() {
+      expect(routerStub.get
+        .withArgs('/', 'salesforceConfigurationCtrl.index')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('GET /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.show', function() {
+      expect(routerStub.get
+        .withArgs('/:id', 'salesforceConfigurationCtrl.show')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('POST /api/salesforce/configurations', function() {
+
+    it('should route to salesforceConfiguration.controller.create', function() {
+      expect(routerStub.post
+        .withArgs('/', 'salesforceConfigurationCtrl.create')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PUT /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.update', function() {
+      expect(routerStub.put
+        .withArgs('/:id', 'salesforceConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('PATCH /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.update', function() {
+      expect(routerStub.patch
+        .withArgs('/:id', 'salesforceConfigurationCtrl.update')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+  describe('DELETE /api/salesforce/configurations/:id', function() {
+
+    it('should route to salesforceConfiguration.controller.destroy', function() {
+      expect(routerStub.delete
+        .withArgs('/:id', 'salesforceConfigurationCtrl.destroy')
+        ).to.have.been.calledOnce;
+    });
+
+  });
+
+});