Skip to content

Commit

Permalink
Test: use applicationId (was hardcoded).
Browse files Browse the repository at this point in the history
Part of #418.
  • Loading branch information
dennisguse committed Dec 28, 2024
1 parent 5857c00 commit a2a9132
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import java.util.Set;

import de.dennisguse.opentracks.BuildConfig;
import de.dennisguse.opentracks.data.models.Track;
import de.dennisguse.opentracks.io.file.TrackFileFormat;

Expand All @@ -34,6 +35,7 @@ public void testCreateAndParseURI_valid() {
public void testCreateURIescapeFilename() {
Pair<Uri, String> shareURIandMIME = ShareContentProvider.createURI(Set.of(new Track.Id(1)), "../../&1=1", TrackFileFormat.KML_WITH_TRACKDETAIL_AND_SENSORDATA);

assertEquals(Uri.parse("content://de.dennisguse.opentracks.debug.content/tracks/KML_WITH_TRACKDETAIL_AND_SENSORDATA/1/..%2F..%2F%261%3D1"), shareURIandMIME.first);

assertEquals(Uri.parse("content://" + BuildConfig.APPLICATION_ID + ".content/tracks/KML_WITH_TRACKDETAIL_AND_SENSORDATA/1/..%2F..%2F%261%3D1"), shareURIandMIME.first);
}
}

0 comments on commit a2a9132

Please sign in to comment.