File tree Expand file tree Collapse file tree
test/src/test/java/com/danikula/videocache Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .danikula .videocache ;
22
33import com .danikula .videocache .test .BuildConfig ;
4-
4+ import java .io .ByteArrayOutputStream ;
5+ import java .util .Arrays ;
56import org .junit .Ignore ;
67import org .junit .Test ;
78import org .junit .runner .RunWith ;
89import org .robolectric .RobolectricGradleTestRunner ;
910import org .robolectric .annotation .Config ;
1011
11- import java .io .ByteArrayOutputStream ;
12- import java .util .Arrays ;
13-
1412import static com .danikula .videocache .support .ProxyCacheTestUtils .ASSETS_DATA_BIG_NAME ;
1513import static com .danikula .videocache .support .ProxyCacheTestUtils .ASSETS_DATA_NAME ;
1614import static com .danikula .videocache .support .ProxyCacheTestUtils .HTTP_DATA_BIG_SIZE ;
@@ -67,4 +65,9 @@ public void testMimeByUrl() throws Exception {
6765 assertThat (new HttpUrlSource ("http://mysite.by/video.mp4" ).getMime ()).isEqualTo ("video/mp4" );
6866 assertThat (new HttpUrlSource (HTTP_DATA_URL ).getMime ()).isEqualTo ("image/jpeg" );
6967 }
68+
69+ @ Test
70+ public void testHttpUrlSourceRedirect () throws Exception {
71+ assertThat (new HttpUrlSource ("http://goo.gl/K0gWQW" ).getMime ()).isEqualTo ("video/mp4" );
72+ }
7073}
You can’t perform that action at this time.
0 commit comments