service.list().subscribe((resp) => {
result = resp;
});
- const req = httpTesting.expectOne('/api/rgw/bucket');
+ const req = httpTesting.expectOne('api/rgw/bucket');
req.flush([]);
expect(req.request.method).toBe('GET');
expect(result).toEqual([]);
service.list().subscribe((resp) => {
result = resp;
});
- let req = httpTesting.expectOne('/api/rgw/bucket');
+ let req = httpTesting.expectOne('api/rgw/bucket');
req.flush(['foo', 'bar']);
- req = httpTesting.expectOne('/api/rgw/bucket/foo');
+ req = httpTesting.expectOne('api/rgw/bucket/foo');
req.flush({ name: 'foo' });
- req = httpTesting.expectOne('/api/rgw/bucket/bar');
+ req = httpTesting.expectOne('api/rgw/bucket/bar');
req.flush({ name: 'bar' });
expect(req.request.method).toBe('GET');
it('should call get', () => {
service.get('foo').subscribe();
- const req = httpTesting.expectOne('/api/rgw/bucket/foo');
+ const req = httpTesting.expectOne('api/rgw/bucket/foo');
expect(req.request.method).toBe('GET');
});
it('should call create', () => {
service.create('foo', 'bar').subscribe();
- const req = httpTesting.expectOne('/api/rgw/bucket?bucket=foo&uid=bar');
+ const req = httpTesting.expectOne('api/rgw/bucket?bucket=foo&uid=bar');
expect(req.request.method).toBe('POST');
});
it('should call update', () => {
service.update('foo', 'bar', 'baz').subscribe();
- const req = httpTesting.expectOne('/api/rgw/bucket/foo?bucket_id=bar&uid=baz');
+ const req = httpTesting.expectOne('api/rgw/bucket/foo?bucket_id=bar&uid=baz');
expect(req.request.method).toBe('PUT');
});
it('should call delete, with purgeObjects = true', () => {
service.delete('foo').subscribe();
- const req = httpTesting.expectOne('/api/rgw/bucket/foo?purge_objects=true');
+ const req = httpTesting.expectOne('api/rgw/bucket/foo?purge_objects=true');
expect(req.request.method).toBe('DELETE');
});
it('should call delete, with purgeObjects = false', () => {
service.delete('foo', false).subscribe();
- const req = httpTesting.expectOne('/api/rgw/bucket/foo?purge_objects=false');
+ const req = httpTesting.expectOne('api/rgw/bucket/foo?purge_objects=false');
expect(req.request.method).toBe('DELETE');
});
service.exists('foo').subscribe((resp) => {
result = resp;
});
- const req = httpTesting.expectOne('/api/rgw/bucket');
+ const req = httpTesting.expectOne('api/rgw/bucket');
expect(req.request.method).toBe('GET');
req.flush(['foo', 'bar']);
expect(result).toBe(true);
service.list().subscribe((resp) => {
result = resp;
});
- const req = httpTesting.expectOne('/api/rgw/user');
+ const req = httpTesting.expectOne('api/rgw/user');
expect(req.request.method).toBe('GET');
req.flush([]);
expect(result).toEqual([]);
result = resp;
});
- let req = httpTesting.expectOne('/api/rgw/user');
+ let req = httpTesting.expectOne('api/rgw/user');
expect(req.request.method).toBe('GET');
req.flush(['foo', 'bar']);
- req = httpTesting.expectOne('/api/rgw/user/foo');
+ req = httpTesting.expectOne('api/rgw/user/foo');
expect(req.request.method).toBe('GET');
req.flush({ name: 'foo' });
- req = httpTesting.expectOne('/api/rgw/user/bar');
+ req = httpTesting.expectOne('api/rgw/user/bar');
expect(req.request.method).toBe('GET');
req.flush({ name: 'bar' });
it('should call enumerate', () => {
service.enumerate().subscribe();
- const req = httpTesting.expectOne('/api/rgw/user');
+ const req = httpTesting.expectOne('api/rgw/user');
expect(req.request.method).toBe('GET');
});
it('should call get', () => {
service.get('foo').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo');
+ const req = httpTesting.expectOne('api/rgw/user/foo');
expect(req.request.method).toBe('GET');
});
it('should call getQuota', () => {
service.getQuota('foo').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/quota');
+ const req = httpTesting.expectOne('api/rgw/user/foo/quota');
expect(req.request.method).toBe('GET');
});
it('should call update', () => {
service.update('foo', { xxx: 'yyy' }).subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo?xxx=yyy');
+ const req = httpTesting.expectOne('api/rgw/user/foo?xxx=yyy');
expect(req.request.method).toBe('PUT');
});
it('should call updateQuota', () => {
service.updateQuota('foo', { xxx: 'yyy' }).subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/quota?xxx=yyy');
+ const req = httpTesting.expectOne('api/rgw/user/foo/quota?xxx=yyy');
expect(req.request.method).toBe('PUT');
});
it('should call create', () => {
service.create({ foo: 'bar' }).subscribe();
- const req = httpTesting.expectOne('/api/rgw/user?foo=bar');
+ const req = httpTesting.expectOne('api/rgw/user?foo=bar');
expect(req.request.method).toBe('POST');
});
it('should call delete', () => {
service.delete('foo').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo');
+ const req = httpTesting.expectOne('api/rgw/user/foo');
expect(req.request.method).toBe('DELETE');
});
it('should call createSubuser', () => {
service.createSubuser('foo', { xxx: 'yyy' }).subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/subuser?xxx=yyy');
+ const req = httpTesting.expectOne('api/rgw/user/foo/subuser?xxx=yyy');
expect(req.request.method).toBe('POST');
});
it('should call deleteSubuser', () => {
service.deleteSubuser('foo', 'bar').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/subuser/bar');
+ const req = httpTesting.expectOne('api/rgw/user/foo/subuser/bar');
expect(req.request.method).toBe('DELETE');
});
it('should call addCapability', () => {
service.addCapability('foo', 'bar', 'baz').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/capability?type=bar&perm=baz');
+ const req = httpTesting.expectOne('api/rgw/user/foo/capability?type=bar&perm=baz');
expect(req.request.method).toBe('POST');
});
it('should call deleteCapability', () => {
service.deleteCapability('foo', 'bar', 'baz').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/capability?type=bar&perm=baz');
+ const req = httpTesting.expectOne('api/rgw/user/foo/capability?type=bar&perm=baz');
expect(req.request.method).toBe('DELETE');
});
it('should call addS3Key', () => {
service.addS3Key('foo', { xxx: 'yyy' }).subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/key?key_type=s3&xxx=yyy');
+ const req = httpTesting.expectOne('api/rgw/user/foo/key?key_type=s3&xxx=yyy');
expect(req.request.method).toBe('POST');
});
it('should call deleteS3Key', () => {
service.deleteS3Key('foo', 'bar').subscribe();
- const req = httpTesting.expectOne('/api/rgw/user/foo/key?key_type=s3&access_key=bar');
+ const req = httpTesting.expectOne('api/rgw/user/foo/key?key_type=s3&access_key=bar');
expect(req.request.method).toBe('DELETE');
});