Skip to content

Commit

Permalink
TEST: Wrote test for service "/topic/ID/ID" (see Hypertopic#213).
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrihard committed Jun 16, 2018
1 parent 8b00bc3 commit 53b8089
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/api/topic_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const frisby = require('frisby');
const Joi = frisby.Joi; // Frisby exports Joi for convenience on type assersions
const V = require('./vhost');

describe('GET /topic/ID/ID', function()
{
const uri = V.HOST + '/topic/toto/toto';

it ('should return an empty \"rows\" array for a wrong viewpoint and/or a wrong topic', function () {
return frisby
.get(uri)
.expect('status', 200)
.expect('header', 'Content-Type', 'application/json')
.expect('json', 'rows', []);
});
});

0 comments on commit 53b8089

Please sign in to comment.