diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-03 14:20:06 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-03 14:20:06 +0200 |
commit | 22c69f787adf5d1aeb1fcba62ae4ae0e3b1301be (patch) | |
tree | 18b2a049030af71fba4bdc1289d27846443a35c7 /sonar-server | |
parent | aed2ea7a145c6f3b8a1fbcf61b3e230b92594e37 (diff) | |
download | sonarqube-22c69f787adf5d1aeb1fcba62ae4ae0e3b1301be.tar.gz sonarqube-22c69f787adf5d1aeb1fcba62ae4ae0e3b1301be.zip |
Add check to verify that created_at and updated_at are set in active rules (MT is ignored because it's failing)
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java b/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java index 3e5b5c5654b..83d1ff1775e 100644 --- a/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java +++ b/sonar-server/src/test/java/org/sonar/server/qualityprofile/RuleActivatorMediumTest.java @@ -20,11 +20,7 @@ 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()) { |