Skip to content

Commit

Permalink
Merge 7a8dc8f into 36ad690
Browse files Browse the repository at this point in the history
  • Loading branch information
bukajsytlos committed Oct 18, 2018
2 parents 36ad690 + 7a8dc8f commit ffd575f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/faforever/api/map/MapService.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private void updateMapEntities(MapUploadData progressData) {
.setDescription(scenarioInfo.get(ScenarioMapInfo.DESCRIPTION).tojstring().replaceAll("<LOC .*?>", ""))
.setWidth(size.get(1).toint())
.setHeight(size.get(2).toint())
.setHidden(false)
.setHidden(true)
.setRanked(progressData.isRanked())
.setMaxPlayers(scenarioInfo.get(ScenarioMapInfo.CONFIGURATIONS).get(ScenarioMapInfo.CONFIGURATION_STANDARD).get(ScenarioMapInfo.CONFIGURATION_STANDARD_TEAMS).get(1)
.get(ScenarioMapInfo.CONFIGURATION_STANDARD_TEAMS_ARMIES).length())
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/faforever/api/map/MapServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.zip.ZipInputStream;

import static com.faforever.api.error.ApiExceptionWithCode.apiExceptionWithCode;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
Expand Down Expand Up @@ -262,6 +263,7 @@ public void positiveUploadTest() throws IOException {
assertEquals(256, mapVersion.getHeight());
assertEquals(256, mapVersion.getWidth());
assertEquals(3, mapVersion.getMaxPlayers());
assertThat(mapVersion.isHidden(), is(true));
assertEquals("maps/sludge_test.v0001.zip", mapVersion.getFilename());

assertFalse(Files.exists(tmpDir));
Expand Down

0 comments on commit ffd575f

Please sign in to comment.