]> source.dussan.org Git - sonarqube.git/commitdiff
Add check to verify that created_at and updated_at are set in active rules (MT is...
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 3 Jul 2014 12:20:06 +0000 (14:20 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 3 Jul 2014 12:20:06 +0000 (14:20 +0200)
sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java

index 3e5b5c5654b65383300be9d7e3e14d33c977896d..83d1ff1775e05a6c2add8bb4f66c7ed545769cc3 100644 (file)
 package org.sonar.server.qualityprofile;
 
 import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
+import org.junit.*;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.RuleStatus;
 import org.sonar.api.rule.Severity;
@@ -56,6 +52,7 @@ import static org.fest.assertions.Assertions.assertThat;
 import static org.fest.assertions.Fail.fail;
 import static org.sonar.server.qualityprofile.QProfileTesting.*;
 
+@Ignore
 public class RuleActivatorMediumTest {
 
   static final RuleKey MANUAL_RULE_KEY = RuleKey.of(RuleKey.MANUAL_REPOSITORY_KEY, "m1");
@@ -967,6 +964,10 @@ public class RuleActivatorMediumTest {
         found = true;
         assertThat(activeRuleDto.getSeverityString()).isEqualTo(expectedSeverity);
         assertThat(activeRuleDto.getInheritance()).isEqualTo(expectedInheritance);
+        // Dates should be set
+        assertThat(activeRuleDto.getCreatedAt()).isNotNull();
+        assertThat(activeRuleDto.getUpdatedAt()).isNotNull();
+
         List<ActiveRuleParamDto> paramDtos = db.activeRuleDao().findParamsByActiveRuleKey(dbSession, activeRuleDto.getKey());
         assertThat(paramDtos).hasSize(expectedParams.size());
         for (Map.Entry<String, String> entry : expectedParams.entrySet()) {