@@ -29,7 +29,7 @@ describe('Remote Operations - Unit Tests', () => {
2929 config . setDB ( 'testdb' ) ;
3030
3131 const url = config . remoteURL ( ) ;
32- expect ( url ) . to . equal ( 'http://localhost:6363/api/remote/admin/testdb/local/branch/main ' ) ;
32+ expect ( url ) . to . equal ( 'http://localhost:6363/api/remote/admin/testdb' ) ;
3333 } ) ;
3434
3535 it ( 'should generate correct URL with remote name' , ( ) => {
@@ -38,7 +38,7 @@ describe('Remote Operations - Unit Tests', () => {
3838 config . setDB ( 'testdb' ) ;
3939
4040 const url = config . remoteURL ( 'origin' ) ;
41- expect ( url ) . to . equal ( 'http://localhost:6363/api/remote/admin/testdb/local/branch/main/ origin' ) ;
41+ expect ( url ) . to . equal ( 'http://localhost:6363/api/remote/admin/testdb/origin' ) ;
4242 } ) ;
4343
4444 it ( 'should URL encode remote name with special characters' , ( ) => {
@@ -71,7 +71,7 @@ describe('Remote Operations - Unit Tests', () => {
7171
7272 expect ( stub . calledOnce ) . to . be . true ;
7373 const call = stub . getCall ( 0 ) ;
74- expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb/local/branch/main ' ) ;
74+ expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb' ) ;
7575 expect ( call . args [ 1 ] ) . to . deep . equal ( {
7676 remote_name : 'origin' ,
7777 remote_location : 'http://remote.example.com/org/db'
@@ -148,7 +148,7 @@ describe('Remote Operations - Unit Tests', () => {
148148
149149 expect ( stub . calledOnce ) . to . be . true ;
150150 const call = stub . getCall ( 0 ) ;
151- expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb/local/branch/main ' ) ;
151+ expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb' ) ;
152152 expect ( call . args [ 0 ] ) . to . include ( 'remote_name=origin' ) ;
153153 } ) ;
154154
@@ -191,7 +191,7 @@ describe('Remote Operations - Unit Tests', () => {
191191
192192 expect ( stub . calledOnce ) . to . be . true ;
193193 const call = stub . getCall ( 0 ) ;
194- expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb/local/branch/main ' ) ;
194+ expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb' ) ;
195195 expect ( call . args [ 1 ] ) . to . deep . equal ( {
196196 remote_name : 'origin' ,
197197 remote_location : 'http://new.example.com/org/db'
@@ -264,7 +264,7 @@ describe('Remote Operations - Unit Tests', () => {
264264
265265 expect ( stub . calledOnce ) . to . be . true ;
266266 const call = stub . getCall ( 0 ) ;
267- expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb/local/branch/main ' ) ;
267+ expect ( call . args [ 0 ] ) . to . include ( '/api/remote/admin/testdb' ) ;
268268 expect ( call . args [ 0 ] ) . to . include ( 'remote_name=origin' ) ;
269269 } ) ;
270270
@@ -300,20 +300,20 @@ describe('Remote Operations - Unit Tests', () => {
300300 it ( 'should use current database context' , async ( ) => {
301301 const stub = sandbox . stub ( axiosInstance , 'post' ) . resolves ( {
302302 status : 200 ,
303- data : { '@type' : 'api:RemoteAddedResponse ' }
303+ data : { '@type' : 'api:RemoteResponse ' }
304304 } ) ;
305305
306306 client . db ( 'mydb' ) ;
307307 await client . createRemote ( 'origin' , 'http://example.com' ) ;
308308
309309 const call = stub . getCall ( 0 ) ;
310- expect ( call . args [ 0 ] ) . to . include ( '/mydb/ ' ) ;
310+ expect ( call . args [ 0 ] ) . to . include ( '/mydb' ) ;
311311 } ) ;
312312
313313 it ( 'should use current organization context' , async ( ) => {
314314 const stub = sandbox . stub ( axiosInstance , 'post' ) . resolves ( {
315315 status : 200 ,
316- data : { '@type' : 'api:RemoteAddedResponse ' }
316+ data : { '@type' : 'api:RemoteResponse ' }
317317 } ) ;
318318
319319 client . organization ( 'myorg' ) ;
0 commit comments