]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6089 Fix test
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 5 Feb 2015 15:37:13 +0000 (16:37 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 5 Feb 2015 15:46:30 +0000 (16:46 +0100)
server/sonar-server/src/test/java/org/sonar/server/computation/step/PurgeRemovedViewsStepTest.java

index 36e973f74111a62e35a41888a171a865cc830651..a11c2c80ddf6c91d331aa161be192f60251744ad 100644 (file)
@@ -96,21 +96,8 @@ public class PurgeRemovedViewsStepTest {
   }
 
   @Test
-  public void nothing_to_do_when_not_analysing_view() throws Exception {
-    when(context.getProject()).thenReturn(ComponentTesting.newProjectDto("DBCA"));
-
-    esTester.putDocuments(ViewIndexDefinition.INDEX, ViewIndexDefinition.TYPE_VIEW,
-      new ViewDoc().setUuid("ABCD"),
-      // This vies does not exists in db...
-      new ViewDoc().setUuid("BCDE"));
-
-    dbClient.componentDao().insert(session, ComponentTesting.newProjectDto("ABCD").setQualifier(Qualifiers.VIEW));
-    session.commit();
-
-    step.execute(context);
-
-    // ... But it should not be removed as the project of the context is not a view
-    assertThat(esTester.countDocuments(ViewIndexDefinition.INDEX, ViewIndexDefinition.TYPE_VIEW)).isEqualTo(2);
+  public void only_support_views() throws Exception {
+    assertThat(step.supportedProjectQualifiers()).containsOnly(Qualifiers.VIEW);
   }
 
 }