2019-05-31 12:56:13 +02:00
|
|
|
const oceanMock = {
|
|
|
|
ocean: {
|
|
|
|
accounts: {
|
|
|
|
list: () => ['xxx', 'xxx']
|
|
|
|
},
|
|
|
|
aquarius: {
|
|
|
|
queryMetadata: () => {
|
|
|
|
return {
|
|
|
|
results: [],
|
|
|
|
totalResults: 1,
|
|
|
|
totalPages: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-05-31 13:53:05 +02:00
|
|
|
assets: {
|
|
|
|
resolve: jest.fn(),
|
|
|
|
order: () => {
|
|
|
|
return {
|
|
|
|
next: jest.fn()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
consume: jest.fn()
|
|
|
|
},
|
2019-05-31 12:56:13 +02:00
|
|
|
keeper: {
|
|
|
|
conditions: {
|
|
|
|
accessSecretStoreCondition: {
|
2019-05-31 13:53:05 +02:00
|
|
|
getGrantedDidByConsumer: () => {
|
|
|
|
return {
|
|
|
|
find: jest.fn()
|
|
|
|
}
|
|
|
|
}
|
2019-05-31 12:56:13 +02:00
|
|
|
}
|
|
|
|
}
|
2019-06-19 13:14:42 +02:00
|
|
|
},
|
|
|
|
versions: {
|
|
|
|
get: jest.fn(() =>
|
|
|
|
Promise.resolve({
|
|
|
|
squid: {
|
|
|
|
name: 'Squid-js',
|
|
|
|
status: 'Working'
|
|
|
|
},
|
|
|
|
aquarius: {
|
|
|
|
name: 'Aquarius',
|
|
|
|
status: 'Working'
|
|
|
|
},
|
|
|
|
brizo: {
|
|
|
|
name: 'Brizo',
|
|
|
|
network: 'Nile',
|
|
|
|
status: 'Working',
|
|
|
|
contracts: {
|
|
|
|
hello: 'hello',
|
|
|
|
hello2: 'hello2'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
status: {
|
|
|
|
ok: true,
|
|
|
|
network: true,
|
|
|
|
contracts: true
|
|
|
|
}
|
|
|
|
})
|
|
|
|
)
|
2019-05-31 12:56:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default oceanMock
|