Skip to content

Instantly share code, notes, and snippets.

@kadams54
Created September 23, 2014 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadams54/8a32eeee81e62031f17c to your computer and use it in GitHub Desktop.
Save kadams54/8a32eeee81e62031f17c to your computer and use it in GitHub Desktop.
diff --git a/test/test_model.js b/test/test_model.js
index b287403..5975fd2 100644
--- a/test/test_model.js
+++ b/test/test_model.js
@@ -525,6 +525,34 @@ describe('test_model.js', function() {
false, 'compare set 4 failed');
});
+ it.only('can compare two diff endpoint sets with a common origin', function() {
+ var relations = new models.RelationList();
+ var endpointSetA = [
+ ['shard3', {
+ name: 'database',
+ role: 'provider'
+ }],
+ ['mongos', {
+ name: 'mongos',
+ role: 'requirer'
+ }]
+ ];
+ var endpointSetB = [
+ ['shard1', {
+ name: 'database',
+ role: 'provider'
+ }],
+ ['mongos', {
+ name: 'mongos',
+ role: 'requirer'
+ }]
+ ];
+
+ assert.equal(
+ relations.compareRelationEndpoints(endpointSetA, endpointSetB),
+ false,
+ 'compare set 1 failed');
+ });
it('must be able to reference the Environment model', function() {
var db = new models.Database();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment