Skip to content

Commit 748e7dd

Browse files
committed
Improved unit tests.
1 parent 05f8241 commit 748e7dd

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/test-builders.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,24 @@ function test_ErrorBuilder() {
519519
async.$transform('3');
520520
});
521521

522+
NEWSCHEMA('Repository').make(function(schema) {
523+
524+
schema.addWorkflow('1', function(error, model, options, callback) {
525+
model.$repository('valid', true);
526+
callback();
527+
});
528+
529+
schema.addWorkflow('2', function(error, model, options, callback) {
530+
callback();
531+
});
532+
533+
var model = schema.create();
534+
535+
model.$async(function(err, response) {
536+
assert.ok(model.$repository('valid') === true, 'SchemaBuilder.$repository()');
537+
}).$workflow('1').$workflow('2');
538+
});
539+
522540
};
523541

524542
function test_TransformBuilder() {

0 commit comments

Comments
 (0)