From 5686fcc7cc310e5603c4620d74e8cf679a38eeb2 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 9 Dec 2016 09:27:24 +0100 Subject: SONAR-8466 Create WS api/project_analyses/update_event --- sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sonar-db/src/test') diff --git a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java b/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java index b5e2850b1ea..120d4493278 100644 --- a/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java @@ -129,6 +129,18 @@ public class EventDaoTest { dbTester.assertDbUnit(getClass(), "insert-result.xml", new String[] {"id"}, "events"); } + @Test + public void update_name_and_description() { + SnapshotDto analysis = dbTester.components().insertProjectAndSnapshot(newProjectDto()); + dbTester.events().insertEvent(newEvent(analysis).setUuid("E1")); + + underTest.update(dbSession, "E1", "New Name", "New Description"); + + EventDto result = dbClient.eventDao().selectByUuid(dbSession, "E1").get(); + assertThat(result.getName()).isEqualTo("New Name"); + assertThat(result.getDescription()).isEqualTo("New Description"); + } + @Test public void delete_by_id() { dbTester.prepareDbUnit(getClass(), "delete.xml"); -- cgit v1.2.3