Fix the failing unit test
[potlatch2.git] / tests / src / net / systemeD / halcyon / connection / actions / AddMemberToRelationActionTest.as
index 533fa78788063e9cec4a077f2bc591ff43f76d6a..2704e7adb4fcb133787a9fd7ed92840027fec54b 100644 (file)
@@ -18,12 +18,11 @@ package net.systemeD.halcyon.connection.actions {
             var rel:Relation = new Relation(1,1,{},true,[]);
             var member:RelationMember = new RelationMember(n, "foo");
 
-            //This throws an error, but JoinNodeActionTest doesn't. Why?
+            //Instantiate the connection first to prevent errors
+            Connection.getConnection();
+            rel.appendMember(member, function(action:UndoableAction):void { action.doAction(); })
+            Assert.assertEquals(1, rel.length);
 
-            //rel.appendMember(member, function(action:UndoableAction):void { action.doAction(); })
-            //Assert.assertEquals(rel.length,1);
-
-            //Assert.assertNotNull(Connection.getConnectionInstance()) <- this fails, and is the cause of the above failing. Why?
         }
 
         [Test]