Skip to content

Instantly share code, notes, and snippets.

@thebergamo
Created July 3, 2014 12:33
Show Gist options
  • Save thebergamo/49431ea8e09ed6d0d66b to your computer and use it in GitHub Desktop.
Save thebergamo/49431ea8e09ed6d0d66b to your computer and use it in GitHub Desktop.
Listar Todos Usuários
describe('GET /api/users', function(){
it('recovery users list', function(done){
request('http://localhost:8080/api/')
.get('users')
.set('Content-Type', 'application/json')
.expect('Content-Type', /json/)
.expect(function(res){
if(('error' in res.body)) return "Error here!";
})
.expect(200, done);
});
it('alias recovery user list - alias', function(done){
request('http://localhost:8080/api/')
.get('user')
.set('Content-Type', 'application/json')
.expect('Content-Type', /json/)
.expect(function(res){
if(('error' in res.body)) return "Error here!";
})
.expect(200, done);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment