Skip to content

Commit a221f34

Browse files
committed
Fix tests
1 parent 159c75b commit a221f34

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/test/java/no/ndla/taxonomy/rest/v1/NodesTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ public void can_get_all_connections() throws Exception {
684684
final var connections = testUtils.getObject(ConnectionDTO[].class, response);
685685

686686
assertEquals(3, connections.length, "Correct number of connections");
687-
assertAllTrue(connections, c -> !c.getPaths().isEmpty()); // all connections have at least one path
688687

689688
connectionsHaveCorrectTypes(connections);
690689
}

src/test/java/no/ndla/taxonomy/rest/v1/TopicsTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public void can_get_all_connections() throws Exception {
193193
var connections = testUtils.getObject(ConnectionDTO[].class, response);
194194

195195
assertEquals(3, connections.length, "Correct number of connections");
196-
assertAllTrue(connections, c -> !c.getPaths().isEmpty()); // all connections have at least one path
197196

198197
connectionsHaveCorrectTypes(connections);
199198
}

src/test/java/no/ndla/taxonomy/service/NodeServiceTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ public void getAllConnections() {
7272
final var childTopicSubtopic = mock(NodeConnection.class);
7373

7474
when(subjectTopic.getPublicId()).thenReturn(URI.create("urn:subject-topic"));
75+
when(subjectTopic.getConnectionType()).thenReturn(NodeConnectionType.BRANCH);
7576
when(parentTopicSubtopic.getPublicId()).thenReturn(URI.create("urn:parent-topic"));
77+
when(parentTopicSubtopic.getConnectionType()).thenReturn(NodeConnectionType.BRANCH);
7678
when(childTopicSubtopic.getPublicId()).thenReturn(URI.create("urn:child-topic"));
79+
when(childTopicSubtopic.getConnectionType()).thenReturn(NodeConnectionType.BRANCH);
7780

7881
final var parentConnectionsToReturn = Set.of(subjectTopic);
7982
final var childConnectionsToReturn = Set.of(childTopicSubtopic);

0 commit comments

Comments
 (0)