3 var assert = require('assert');
4 var fixtureLoader = require('gitter-web-test-utils/lib/test-fixtures');
5 var uriResolver = require('../lib/uri-resolver');
7 describe('uri-resolver', function() {
8 var fixture = fixtureLoader.setup({
11 troupe1: { group: 'group1', security: 'PUBLIC' }
14 describe('uriResolver', () => {
15 it('should resolve user', () => {
16 return uriResolver(fixture.user1.get('id'), fixture.user1.get('username')).then(function(
19 assert.strictEqual(result.user.username, fixture.user1.get('username'));
23 it('should resolve room', () => {
24 return uriResolver(fixture.user1.get('id'), fixture.troupe1.get('uri')).then(function(
27 assert.strictEqual(result.room.uri, fixture.troupe1.get('uri'));
31 it('should resolve group', () => {
32 return uriResolver(fixture.user1.get('id'), fixture.group1.get('uri')).then(function(result) {
33 assert.strictEqual(result.group.uri, fixture.group1.get('uri'));