mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
feat: add certification thing
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {expect} from 'chai';
|
||||
import {slow, suite, test, timeout} from '@testdeck/mocha';
|
||||
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
|
||||
import {expect} from 'chai';
|
||||
import {SCBulkAddRoute} from '../src/protocol/routes/bulk-add';
|
||||
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
|
||||
import {SCThingUpdateRoute} from '../src/protocol/routes/thing-update';
|
||||
|
||||
@suite(timeout(10000), slow(5000))
|
||||
@@ -24,9 +24,11 @@ export class RoutesSpec {
|
||||
public bulkAddRouteUrlPath() {
|
||||
const bulkAddRoute = new SCBulkAddRoute();
|
||||
|
||||
expect(bulkAddRoute.getUrlPath({
|
||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||
})).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||
expect(
|
||||
bulkAddRoute.getUrlPath({
|
||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||
}),
|
||||
).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||
}
|
||||
|
||||
@test
|
||||
@@ -40,10 +42,12 @@ export class RoutesSpec {
|
||||
public thingUpdateRouteUrlPath() {
|
||||
const thingUpdateRoute = new SCThingUpdateRoute();
|
||||
|
||||
expect(thingUpdateRoute.getUrlPath({
|
||||
TYPE: 'dish',
|
||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||
})).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||
expect(
|
||||
thingUpdateRoute.getUrlPath({
|
||||
TYPE: 'dish',
|
||||
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
|
||||
}),
|
||||
).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
|
||||
}
|
||||
|
||||
@test
|
||||
@@ -72,6 +76,6 @@ export class RoutesSpec {
|
||||
});
|
||||
};
|
||||
|
||||
expect(fn).to.throw('Parameter \'TYPE\' not provided.');
|
||||
expect(fn).to.throw("Parameter 'TYPE' not provided.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user