package com.couchbase.cblite.replicator;

import android.test.InstrumentationTestCase;

import junit.framework.Assert;

import java.net.URL;

public class TestReplicator extends InstrumentationTestCase {

    public void testBuildRelativeURLString() throws Exception {
        CBLReplicator replicator = new CBLPusher(null, new URL("http://10.0.0.3:4984/todos/"), false, null);
        String relativeUrlString = replicator.buildRelativeURLString("/_facebook");

        
        Assert.assertTrue(relativeUrlString.contains("//") == false);


    }

}

@@ -261,16 +261,77 @@
 eption %7B
+%0A%0A        String dbUrlString = %22http://10.0.0.3:4984/todos/%22;
 %0A       
@@ -390,37 +390,19 @@
 URL(
-%22http://10.0.0.3:4984/todos/%22
+dbUrlString
 ), f
@@ -484,17 +484,16 @@
 String(%22
-/
 _faceboo
@@ -510,80 +510,123 @@
     
-%0A        Assert.assertTrue(relativeUrlString.contains(%22//%22) == false);%0A%0A
+String expected = %22http://10.0.0.3:4984/todos/_facebook%22;%0A        Assert.assertEquals(expected, relativeUrlString);
 %0A   

Improve test for issue #87