Fixed broken android (integration) test.

This commit is contained in:
Paul Hawke 2017-12-08 15:38:27 -06:00
parent 223df26c55
commit 1d8422b900

View file

@ -7,6 +7,8 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import fr.free.nrw.commons.BuildConfig;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
@ -14,7 +16,7 @@ import static org.junit.Assert.assertThat;
public class FileUtilsTest {
@Test
public void isSelfOwned() throws Exception {
Uri uri = Uri.parse("content://fr.free.nrw.commons.provider/document/1");
Uri uri = Uri.parse("content://" + BuildConfig.APPLICATION_ID + ".provider/document/1");
boolean selfOwned = FileUtils.isSelfOwned(InstrumentationRegistry.getTargetContext(), uri);
assertThat(selfOwned, is(true));
}