123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * This file is part of the storage node for the Joystream project.
- * Copyright (C) 2019 Joystream Contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- 'use strict';
- const mocha = require('mocha');
- const expect = require('chai').expect;
- const sinon = require('sinon');
- const { RuntimeApi } = require('@joystream/storage-runtime-api');
- describe('Assets', () => {
- var api;
- var key;
- before(async () => {
- api = await RuntimeApi.create();
- key = await api.identities.loadUnlock('test/data/edwards_unlocked.json');
- });
- it('returns DataObjects for a content ID', async () => {
- const obj = await api.assets.getDataObject('foo');
- expect(obj.isNone).to.be.true;
- });
- it('can check the liaison for a DataObject', async () => {
- expect(async _ => {
- await api.assets.checkLiaisonForDataObject('foo', 'bar');
- }).to.throw;
- });
- // Needs properly staked accounts
- it('can accept content');
- it('can reject content');
- it('can create a storage relationship for content');
- it('can toggle a storage relatsionship to ready state');
- });
|