diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-12-09 09:27:24 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-12-09 16:26:45 +0100 |
commit | 5686fcc7cc310e5603c4620d74e8cf679a38eeb2 (patch) | |
tree | ab1bdaae83050f929ffa9199607e03924dcdb50c /sonar-db/src/test | |
parent | ca3269cbb334dd33916802af217c5a0a88fe67ba (diff) | |
download | sonarqube-5686fcc7cc310e5603c4620d74e8cf679a38eeb2.tar.gz sonarqube-5686fcc7cc310e5603c4620d74e8cf679a38eeb2.zip |
SONAR-8466 Create WS api/project_analyses/update_event
Diffstat (limited to 'sonar-db/src/test')
-rw-r--r-- | sonar-db/src/test/java/org/sonar/db/event/EventDaoTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ -130,6 +130,18 @@ public class EventDaoTest { } @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"); |