Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix test

  • Loading branch information...
commit fdde14e5ffa7aa67dd1b5fbe23926d18c603d604 1 parent 77590fc
Adriano Raiano authored
Showing with 31 additions and 31 deletions.
  1. +31 −31 test/integration/domainTest.js
View
62 test/integration/domainTest.js
@@ -5,39 +5,8 @@ describe('Domain', function() {
describe('noting a command', function() {
- describe('having bad data', function() {
-
- it('it should acknowledge the command', function(done) {
-
- var cmd = 'foobar';
- domain.handle(cmd, function(err) {
- expect(err).not.to.be.ok();
- done();
- });
-
- });
-
- });
-
describe('having well-formed data', function() {
- describe('having no command handlers', function() {
-
- it('it should acknowledge the command', function(done) {
-
- var cmd = {
- command: 'changeDummy',
- id: '82517'
- };
- domain.handle(cmd, function(err) {
- expect(err).not.to.be.ok();
- done();
- });
-
- });
-
- });
-
describe('having any command handlers', function() {
var dummyEmitter = new (require('events').EventEmitter)();
@@ -57,6 +26,37 @@ describe('Domain', function() {
});
+ describe('having bad data', function() {
+
+ it('it should acknowledge the command', function(done) {
+
+ var cmd = 'foobar';
+ domain.handle(cmd, function(err) {
+ expect(err).not.to.be.ok();
+ done();
+ });
+
+ });
+
+ });
+
+ describe('having a command thant no command handler listens to', function() {
+
+ it('it should acknowledge the command', function(done) {
+
+ var cmd = {
+ command: 'foobar',
+ id: '82517'
+ };
+ domain.handle(cmd, function(err) {
+ expect(err).not.to.be.ok();
+ done();
+ });
+
+ });
+
+ });
+
it('it should acknowledge the command', function(done) {
var cmd = {
Please sign in to comment.
Something went wrong with that request. Please try again.