mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
feat: add certification thing
This commit is contained in:
@@ -12,13 +12,8 @@
|
||||
* 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 {SCBulkResponse} from '../src/protocol/routes/bulk-request';
|
||||
import {SCMultiSearchResponse} from '../src/protocol/routes/search-multi';
|
||||
import {SCSearchResponse} from '../src/protocol/routes/search';
|
||||
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing';
|
||||
import {SCDish} from '../src/things/dish';
|
||||
import {expect} from 'chai';
|
||||
import {
|
||||
isBulkResponse,
|
||||
isMultiSearchResponse,
|
||||
@@ -26,10 +21,14 @@ import {
|
||||
isThing,
|
||||
isThingWithTranslations,
|
||||
} from '../src/guards';
|
||||
import {SCBulkResponse} from '../src/protocol/routes/bulk-request';
|
||||
import {SCSearchResponse} from '../src/protocol/routes/search';
|
||||
import {SCMultiSearchResponse} from '../src/protocol/routes/search-multi';
|
||||
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing';
|
||||
import {SCDish} from '../src/things/dish';
|
||||
|
||||
@suite(timeout(10000), slow(5000))
|
||||
export class GuardsSpec {
|
||||
|
||||
static bulkResponse: SCBulkResponse = {
|
||||
expiration: '2009-06-30T18:30:00+02:00 ',
|
||||
source: 'bar',
|
||||
@@ -39,9 +38,7 @@ export class GuardsSpec {
|
||||
};
|
||||
|
||||
static dishWithTranslation: SCDish = {
|
||||
categories: [
|
||||
'appetizer',
|
||||
],
|
||||
categories: ['appetizer'],
|
||||
name: 'foo',
|
||||
origin: {
|
||||
created: '',
|
||||
@@ -57,9 +54,7 @@ export class GuardsSpec {
|
||||
};
|
||||
|
||||
static notADish = {
|
||||
categories: [
|
||||
'appetizer',
|
||||
],
|
||||
categories: ['appetizer'],
|
||||
name: 'foo',
|
||||
origin: {
|
||||
created: '',
|
||||
@@ -70,18 +65,16 @@ export class GuardsSpec {
|
||||
};
|
||||
|
||||
static searchResponse: SCSearchResponse = {
|
||||
data: [
|
||||
GuardsSpec.dishWithTranslation,
|
||||
],
|
||||
data: [GuardsSpec.dishWithTranslation],
|
||||
facets: [
|
||||
{
|
||||
buckets: [
|
||||
{
|
||||
count: 1,
|
||||
key: 'key',
|
||||
},
|
||||
buckets: [
|
||||
{
|
||||
count: 1,
|
||||
key: 'key',
|
||||
},
|
||||
],
|
||||
field: 'field',
|
||||
field: 'field',
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
|
||||
Reference in New Issue
Block a user