angular-cn/modules/angular2/test/http/base_request_options_spec.ts
Pascal Precht 5a3ce87915 chore(http): remove unused properties from Request
This removes properties mentioned in #3339

Closes #3339
Closes #3823
2015-09-17 17:16:47 -07:00

31 lines
951 B
TypeScript

import {
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit
} from 'angular2/test_lib';
import {BaseRequestOptions, RequestOptions} from 'angular2/src/http/base_request_options';
import {RequestMethods} from 'angular2/src/http/enums';
export function main() {
describe('BaseRequestOptions', () => {
it('should create a new object when calling merge', () => {
var options1 = new BaseRequestOptions();
var options2 = options1.merge(new RequestOptions({method: RequestMethods.Delete}));
expect(options2).not.toBe(options1);
expect(options2.method).toBe(RequestMethods.Delete);
});
it('should retain previously merged values when merging again', () => {
var options1 = new BaseRequestOptions();
var options2 = options1.merge(new RequestOptions({method: RequestMethods.Delete}));
expect(options2.method).toBe(RequestMethods.Delete);
});
});
}