From 42c86af9a27a6e7b06caf688e02727aa4769e1c8 Mon Sep 17 00:00:00 2001 From: Jon Brisbin Date: Tue, 7 Aug 2012 11:07:20 -0500 Subject: [PATCH] Fixed a couple failing tests. --- .../data/rest/webmvc/RepositoryRestController.java | 8 ++++---- .../data/rest/webmvc/spec/DiscoverySpec.groovy | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java index fb97e6ba2..8f326d06a 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java @@ -732,9 +732,9 @@ public class RepositoryRestController selfUri); resource.addLink(new SimpleLink(SELF, selfUri)); - publishEvent(new BeforeRenderResourceEvent(request, repoMeta, body)); - body = resource; + + publishEvent(new BeforeRenderResourceEvent(request, repoMeta, body)); } return negotiateResponse(request, HttpStatus.CREATED, headers, body); @@ -885,9 +885,9 @@ public class RepositoryRestController selfUri); res.addLink(new SimpleLink(SELF, selfUri)); - publishEvent(new BeforeRenderResourceEvent(request, repoMeta, body)); - body = res; + + publishEvent(new BeforeRenderResourceEvent(request, repoMeta, body)); } if(!isUpdate) { diff --git a/spring-data-rest-webmvc/src/test/groovy/org/springframework/data/rest/webmvc/spec/DiscoverySpec.groovy b/spring-data-rest-webmvc/src/test/groovy/org/springframework/data/rest/webmvc/spec/DiscoverySpec.groovy index 6e19626a1..1574f0578 100644 --- a/spring-data-rest-webmvc/src/test/groovy/org/springframework/data/rest/webmvc/spec/DiscoverySpec.groovy +++ b/spring-data-rest-webmvc/src/test/groovy/org/springframework/data/rest/webmvc/spec/DiscoverySpec.groovy @@ -25,7 +25,7 @@ class DiscoverySpec extends BaseSpec { def links = readJson(response).links then: - links.size() == 4 + links.size() == 5 }