Skip to content

Commit 78534ea

Browse files
committed
rest controller tests to have GET as default method
1 parent d36d1b2 commit 78534ea

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/components/rest/controller.tests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('RestController', function() {
2929
it('should have intial state correctly set', function() {
3030
expect(this.scope.response).toEqual(undefined);
3131
expect(this.scope.indices).toEqual(undefined);
32-
expect(this.scope.method).toEqual("POST");
32+
expect(this.scope.method).toEqual("GET");
3333
expect(this.scope.path).toEqual("");
3434
expect(this.scope.options).toEqual([]);
3535
});
@@ -97,7 +97,7 @@ describe('RestController', function() {
9797
spyOn(this.RestDataService, "load").and.returnValue();
9898
spyOn(this.RestDataService, "execute").and.returnValue();
9999
this.scope.execute();
100-
expect(this.RestDataService.execute).toHaveBeenCalledWith('POST', '', '', jasmine.any(Function), jasmine.any(Function));
100+
expect(this.RestDataService.execute).toHaveBeenCalledWith('GET', '', '', jasmine.any(Function), jasmine.any(Function));
101101
expect(this.scope.response).toEqual(undefined);
102102
});
103103

@@ -115,7 +115,7 @@ describe('RestController', function() {
115115
spyOn(this.RestDataService, "load").and.returnValue();
116116
spyOn(this.RestDataService, "execute").and.returnValue();
117117
this.scope.execute();
118-
expect(this.RestDataService.execute).toHaveBeenCalledWith('POST', '', 'raw string', jasmine.any(Function), jasmine.any(Function));
118+
expect(this.RestDataService.execute).toHaveBeenCalledWith('GET', '', 'raw string', jasmine.any(Function), jasmine.any(Function));
119119
expect(this.scope.response).toEqual(undefined);
120120
});
121121

@@ -130,7 +130,7 @@ describe('RestController', function() {
130130
};
131131
spyOn(this.RestDataService, "execute").and.returnValue();
132132
this.scope.execute();
133-
expect(this.RestDataService.execute).toHaveBeenCalledWith("POST", "", "some value", jasmine.any(Function), jasmine.any(Function));
133+
expect(this.RestDataService.execute).toHaveBeenCalledWith("GET", "", "some value", jasmine.any(Function), jasmine.any(Function));
134134
});
135135
});
136136

0 commit comments

Comments
 (0)